]> SALOME platform Git repositories - tools/medcoupling.git/blobdiff - src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx
Salome HOME
scotch6.0.4 needs pthread... Quick and dirty solution to be improved
[tools/medcoupling.git] / src / MEDCoupling / Test / MEDCouplingBasicsTest4.cxx
index f781b061a3bc1b506d6676dbe4ae303e185370ef..9a9361fd85238f2b790f0bf9d686320d60677ecc 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -21,7 +21,7 @@
 #include "MEDCouplingBasicsTest4.hxx"
 #include "MEDCouplingUMesh.hxx"
 #include "MEDCouplingCMesh.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
 #include "MEDCouplingFieldDouble.hxx"
 #include "MEDCouplingMemArray.hxx"
 #include "MEDCouplingGaussLocalization.hxx"
@@ -32,7 +32,7 @@
 #include <functional>
 #include <iterator>
 
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
 
 void MEDCouplingBasicsTest4::testDescriptionInMeshTimeUnit1()
 {
@@ -40,7 +40,7 @@ void MEDCouplingBasicsTest4::testDescriptionInMeshTimeUnit1()
   MEDCouplingUMesh *m=build2DTargetMesh_1();
   m->setDescription(text1);
   CPPUNIT_ASSERT(std::string(m->getDescription())==text1);
-  MEDCouplingUMesh *m2=(MEDCouplingUMesh *)m->deepCpy();
+  MEDCouplingUMesh *m2=(MEDCouplingUMesh *)m->deepCopy();
   CPPUNIT_ASSERT(m->isEqual(m2,1e-12));
   CPPUNIT_ASSERT(std::string(m2->getDescription())==text1);
   m2->setDescription("ggg");
@@ -50,7 +50,7 @@ void MEDCouplingBasicsTest4::testDescriptionInMeshTimeUnit1()
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,ONE_TIME);
   f->setTimeUnit(text1);
   CPPUNIT_ASSERT(std::string(f->getTimeUnit())==text1);
-  MEDCouplingFieldDouble *f2=f->deepCpy();
+  MEDCouplingFieldDouble *f2=f->deepCopy();
   CPPUNIT_ASSERT(std::string(f2->getTimeUnit())==text1);
   f2->decrRef();
   //
@@ -73,7 +73,7 @@ void MEDCouplingBasicsTest4::testMultiFields1()
   CPPUNIT_ASSERT_EQUAL(6,(int)das.size());
   CPPUNIT_ASSERT_EQUAL(5,(int)das2.size());
   //
-  MEDCouplingMultiFields *mfs2=mfs->deepCpy();
+  MEDCouplingMultiFields *mfs2=mfs->deepCopy();
   CPPUNIT_ASSERT(mfs->isEqual(mfs2,1e-12,1e-12));
   mfs2->decrRef();
   //
@@ -167,8 +167,8 @@ void MEDCouplingBasicsTest4::testDAICheckAndPreparePermutation1()
   da->alloc(8,1);
   std::copy(vals1,vals1+8,da->getPointer());
   DataArrayInt *da2=da->checkAndPreparePermutation();
 CPPUNIT_ASSERT_EQUAL(8,da2->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(8,(int)da2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
   for(int i=0;i<8;i++)
     CPPUNIT_ASSERT_EQUAL(expect1[i],da2->getIJ(i,0));
   da2->decrRef();
@@ -178,9 +178,8 @@ void MEDCouplingBasicsTest4::testDAICheckAndPreparePermutation1()
   da->alloc(8,1);
   da->iota(0);
   da2=da->checkAndPreparePermutation();
-  CPPUNIT_ASSERT_EQUAL(8,da2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents());
-  CPPUNIT_ASSERT(da2->isIdentity());
+ CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
+  CPPUNIT_ASSERT(da2->isIota(8));
   da2->decrRef();
   da->decrRef();
   //
@@ -202,8 +201,8 @@ void MEDCouplingBasicsTest4::testDAIChangeSurjectiveFormat1()
   //
   DataArrayInt *da2,*da2I;
   da->changeSurjectiveFormat(4,da2,da2I);
 CPPUNIT_ASSERT_EQUAL(5,da2I->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(8,da2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(5,(int)da2I->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(8,(int)da2->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+5,da2I->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+8,da2->getConstPointer()));
   da2->decrRef();
@@ -220,13 +219,13 @@ void MEDCouplingBasicsTest4::testUMeshGetCellIdsLyingOnNodes1()
   const int nodeIds1[5]={1,2,3,4,6};
   const int nodeIds2[2]={6,7};
   DataArrayInt *da=m->getCellIdsLyingOnNodes(nodeIds1,nodeIds1+5,true);
 CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(1,da->getIJ(0,0));
   da->decrRef();
   da=m->getCellIdsLyingOnNodes(nodeIds2,nodeIds2+2,false);
 CPPUNIT_ASSERT_EQUAL(2,da->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(2,(int)da->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(3,da->getIJ(0,0));
   CPPUNIT_ASSERT_EQUAL(4,da->getIJ(1,0));
   da->decrRef();
@@ -238,8 +237,7 @@ void MEDCouplingBasicsTest4::testUMeshFindCellIdsOnBoundary1()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
   DataArrayInt *da5=m->findCellIdsOnBoundary();
-  CPPUNIT_ASSERT_EQUAL(5,da5->getNumberOfTuples());
-  CPPUNIT_ASSERT(da5->isIdentity());
+  CPPUNIT_ASSERT(da5->isIota(5));
   //
   da5->decrRef();
   m->decrRef();
@@ -275,7 +273,7 @@ void MEDCouplingBasicsTest4::testMeshSetTime1()
   CPPUNIT_ASSERT(!m1->isEqual(m2,1e-12));
   //
   m1->setTime(10.34,55,12);
-  MEDCouplingUMesh *m3=(MEDCouplingUMesh *)m1->deepCpy();
+  MEDCouplingUMesh *m3=(MEDCouplingUMesh *)m1->deepCopy();
   CPPUNIT_ASSERT(m1->isEqual(m3,1e-12));
   tmp3=m3->getTime(tmp1,tmp2);
   CPPUNIT_ASSERT_EQUAL(55,tmp1);
@@ -299,7 +297,7 @@ void MEDCouplingBasicsTest4::testMeshSetTime1()
   CPPUNIT_ASSERT_EQUAL(8,tmp1);
   CPPUNIT_ASSERT_EQUAL(100,tmp2);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(5.67,tmp3,1e-12);
-  MEDCouplingCMesh *c=(MEDCouplingCMesh *)b->deepCpy();
+  MEDCouplingCMesh *c=(MEDCouplingCMesh *)b->deepCopy();
   CPPUNIT_ASSERT(c->isEqual(b,1e-12));
   tmp3=c->getTime(tmp1,tmp2);
   CPPUNIT_ASSERT_EQUAL(8,tmp1);
@@ -321,18 +319,18 @@ void MEDCouplingBasicsTest4::testApplyFuncTwo1()
   std::copy(vals,vals+15,da->getPointer());
   f1->setArray(da);
   //
-  CPPUNIT_ASSERT_THROW(da->applyFunc2(1,"y+z"),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(da->applyFuncCompo(1,"y+z"),INTERP_KERNEL::Exception);
   da->setInfoOnComponent(0,"x [m]");
   da->setInfoOnComponent(1,"y [mm]");
   da->setInfoOnComponent(2,"z [km]");
   
-  CPPUNIT_ASSERT_THROW(da->applyFunc2(1,"x+y+zz+zzz"),INTERP_KERNEL::Exception);
-  CPPUNIT_ASSERT_THROW(da->applyFunc2(1,"toto(x+y)"),INTERP_KERNEL::Exception);
-  CPPUNIT_ASSERT_THROW(da->applyFunc2(1,"x/0"),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(da->applyFuncCompo(1,"x+y+zz+zzz"),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(da->applyFuncCompo(1,"toto(x+y)"),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(da->applyFuncCompo(1,"x/0"),INTERP_KERNEL::Exception);
   
-  DataArrayDouble *da2=da->applyFunc2(1,"y+z");
 CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(5,da2->getNumberOfTuples());
+  DataArrayDouble *da2=da->applyFuncCompo(1,"y+z");
CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(5,(int)da2->getNumberOfTuples());
   const double expected1[5]={32.,34.,36.,38.,40.};
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],da2->getIJ(0,i),1e-12);
@@ -343,11 +341,11 @@ void MEDCouplingBasicsTest4::testApplyFuncTwo1()
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],da2->getIJ(0,i),1e-12);
   da2->decrRef();
   //
 CPPUNIT_ASSERT_EQUAL(3,f1->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
-  f1->applyFunc2(1,"y+z");
 CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)f1->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
+  f1->applyFuncCompo(1,"y+z");
CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getArray()->getIJ(0,i),1e-12);
   //
@@ -370,23 +368,23 @@ void MEDCouplingBasicsTest4::testApplyFuncThree1()
   //
   std::vector<std::string> vs(3);
   vs[0]="x"; vs[1]="Y"; vs[2]="z";
-  CPPUNIT_ASSERT_THROW(da->applyFunc3(1,vs,"y+z"),INTERP_KERNEL::Exception);
-  CPPUNIT_ASSERT_THROW(da->applyFunc3(1,vs,"x+Y+z+zz+zzz"),INTERP_KERNEL::Exception);
-  CPPUNIT_ASSERT_THROW(da->applyFunc3(1,vs,"x/0."),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(da->applyFuncNamedCompo(1,vs,"y+z"),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(da->applyFuncNamedCompo(1,vs,"x+Y+z+zz+zzz"),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(da->applyFuncNamedCompo(1,vs,"x/0."),INTERP_KERNEL::Exception);
   vs[1]="y";
-  DataArrayDouble *da2=da->applyFunc3(1,vs,"y+z");
+  DataArrayDouble *da2=da->applyFuncNamedCompo(1,vs,"y+z");
   const double expected1[5]={32.,34.,36.,38.,40.};
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],da2->getIJ(0,i),1e-12);
   da2->decrRef();
   std::vector<std::string> vs2(4); vs2[0]="x"; vs2[1]="y"; vs2[2]="z"; vs2[3]="a";
-  CPPUNIT_ASSERT_THROW(da->applyFunc3(1,vs2,"x+a"),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(da->applyFuncNamedCompo(1,vs2,"x+a"),INTERP_KERNEL::Exception);
   f1->setArray(da);
 CPPUNIT_ASSERT_EQUAL(3,f1->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
-  f1->applyFunc3(1,vs,"y+z");
 CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)f1->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
+  f1->applyFuncNamedCompo(1,vs,"y+z");
CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getArray()->getIJ(0,i),1e-12);
   //
@@ -398,13 +396,18 @@ void MEDCouplingBasicsTest4::testApplyFuncThree1()
 void MEDCouplingBasicsTest4::testFillFromAnalyticTwo1()
 {
   MEDCouplingUMesh *m1=build3DSurfTargetMesh_1();
-  CPPUNIT_ASSERT_THROW(m1->fillFromAnalytic2(ON_NODES,1,"y+z"),INTERP_KERNEL::Exception);
+  m1->setTime(3.4,5,6); m1->setTimeUnit("us");
+  int a,b;
+  CPPUNIT_ASSERT_THROW(m1->fillFromAnalyticCompo(ON_NODES,1,"y+z"),INTERP_KERNEL::Exception);
   m1->getCoords()->setInfoOnComponent(0,"x [m]");
   m1->getCoords()->setInfoOnComponent(1,"y");
   m1->getCoords()->setInfoOnComponent(2,"z");
-  MEDCouplingFieldDouble *f1=m1->fillFromAnalytic2(ON_NODES,1,"y+z");
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples());
+  MEDCouplingFieldDouble *f1=m1->fillFromAnalyticCompo(ON_NODES,1,"y+z");
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(3.4,f1->getTime(a,b),1.e-14);
+  CPPUNIT_ASSERT_EQUAL(5,a); CPPUNIT_ASSERT_EQUAL(6,b);
+  CPPUNIT_ASSERT_EQUAL(std::string(f1->getTimeUnit()),std::string("us"));
+ CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples());
   const double expected1[9]={0.2, 0.7, 1.2, 0.7, 1.2, 1.7, 1.2, 1.7, 2.2};
   for(int i=0;i<9;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getArray()->getIJ(0,i),1e-12);
@@ -415,13 +418,18 @@ void MEDCouplingBasicsTest4::testFillFromAnalyticTwo1()
 void MEDCouplingBasicsTest4::testFillFromAnalyticThree1()
 {
   MEDCouplingUMesh *m1=build3DSurfTargetMesh_1();
+  m1->setTime(3.4,5,6); m1->setTimeUnit("us");
+  int a,b;
   std::vector<std::string> vs(3);
   vs[0]="x"; vs[1]="Y"; vs[2]="z";
-  CPPUNIT_ASSERT_THROW(m1->fillFromAnalytic3(ON_NODES,1,vs,"y+z"),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(m1->fillFromAnalyticNamedCompo(ON_NODES,1,vs,"y+z"),INTERP_KERNEL::Exception);
   vs[1]="y";
-  MEDCouplingFieldDouble *f1=m1->fillFromAnalytic3(ON_NODES,1,vs,"y+z");
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples());
+  MEDCouplingFieldDouble *f1=m1->fillFromAnalyticNamedCompo(ON_NODES,1,vs,"y+z");
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(3.4,f1->getTime(a,b),1.e-14);
+  CPPUNIT_ASSERT_EQUAL(5,a); CPPUNIT_ASSERT_EQUAL(6,b);
+  CPPUNIT_ASSERT_EQUAL(std::string(f1->getTimeUnit()),std::string("us"));
+ CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples());
   const double expected1[9]={0.2, 0.7, 1.2, 0.7, 1.2, 1.7, 1.2, 1.7, 2.2};
   for(int i=0;i<9;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getArray()->getIJ(0,i),1e-12);
@@ -511,8 +519,8 @@ void MEDCouplingBasicsTest4::testGaussCoordinates1()
   f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_SEG3,refCoo2,gsCoo2,wg2);
   //
   DataArrayDouble *resToTest=f->getLocalizationOfDiscr();
 CPPUNIT_ASSERT_EQUAL(3,resToTest->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(2,resToTest->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)resToTest->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(2,(int)resToTest->getNumberOfTuples());
   const double expected1[6]={0.6,0.6,0.6, 0.6,0.6,0.6};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],resToTest->getIJ(0,i),1e-14);
@@ -550,8 +558,8 @@ void MEDCouplingBasicsTest4::testGaussCoordinates1()
   f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_QUAD8,refCoo6,gsCoo6,wg6);
   //
   resToTest=f->getLocalizationOfDiscr();
-  CPPUNIT_ASSERT_EQUAL(3,resToTest->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(13,resToTest->getNumberOfTuples());//2+3+4+4 gauss points for resp TRI3,TRI6,QUAD4,QUAD8
+  CPPUNIT_ASSERT_EQUAL(3,(int)resToTest->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(13,(int)resToTest->getNumberOfTuples());//2+3+4+4 gauss points for resp TRI3,TRI6,QUAD4,QUAD8
   const double expected2[39]={5.1,1.55,0.0, 4.7,1.65,0.0, //TRI3
                               2.32,1.52,0.0, 1.6,1.32,0.0, 3.52,1.26,0.0,//TRI6
                               2.6,1.6,0.0, 2.4,1.8,0.0, 2.4,1.2,0.0, 2.3,1.46,0.0,//QUAD4
@@ -617,8 +625,8 @@ void MEDCouplingBasicsTest4::testGaussCoordinates1()
   f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_HEXA20,refCoo14,gsCoo14,wg14);
   //
   resToTest=f->getLocalizationOfDiscr();
-  CPPUNIT_ASSERT_EQUAL(3,resToTest->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(8,resToTest->getNumberOfTuples());//2+3+4+4 gauss points for resp TRI3,TRI6,QUAD4,QUAD8
+  CPPUNIT_ASSERT_EQUAL(3,(int)resToTest->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(8,(int)resToTest->getNumberOfTuples());//2+3+4+4 gauss points for resp TRI3,TRI6,QUAD4,QUAD8
   const double expected3[24]={1.312,3.15,1.02, 0.56,3.3,0.6, 2.18,1.1,0.2, 1.18,1.54,0.98, 1.56,0.3,3.6, 1.613,0.801,4.374, 2.6,2.4,2.3, 2.31232,2.3933985,1.553255};
   for(int i=0;i<24;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected3[i],resToTest->getIJ(0,i),1e-14);
@@ -733,10 +741,10 @@ void MEDCouplingBasicsTest4::testGetValueOn2()
   const double values1[15]={7.,107.,10007.,8.,108.,10008.,9.,109.,10009.,10.,110.,10010.,11.,111.,10011.};
   std::copy(values1,values1+15,arr->getPointer());
   const double loc[10]={-0.05,-0.05, 0.55,-0.25, 0.55,0.15, -0.05,0.45, 0.45,0.45};
-  f->checkCoherency();
+  f->checkConsistencyLight();
   DataArrayDouble *locs=f->getValueOnMulti(loc,5);
 CPPUNIT_ASSERT_EQUAL(5,locs->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(3,locs->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(5,(int)locs->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)locs->getNumberOfComponents());
   for(int j=0;j<15;j++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(values1[j],locs->getIJ(0,j),1e-12);
   locs->decrRef();
@@ -753,10 +761,10 @@ void MEDCouplingBasicsTest4::testGetValueOn2()
   std::copy(values2,values2+27,arr->getPointer());
   const double loc2[8]={0.5432,-0.2432, 0.5478,0.1528, 0.5432,-0.2432, 0.5432,-0.2432};
   const double expected2[12]={9.0272, 109.0272, 10009.0272, 11.4124,111.4124,10011.4124, 9.0272, 109.0272, 10009.0272, 9.0272, 109.0272, 10009.0272};
-  f->checkCoherency();
+  f->checkConsistencyLight();
   locs=f->getValueOnMulti(loc2,4);
 CPPUNIT_ASSERT_EQUAL(4,locs->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(3,locs->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(4,(int)locs->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)locs->getNumberOfComponents());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],locs->getIJ(0,i),1e-12);
   f->decrRef();
@@ -771,20 +779,20 @@ void MEDCouplingBasicsTest4::testDAIGetIdsNotEqual1()
   const int vals1[10]={2,3,5,6,8,5,5,6,1,-5};
   d->alloc(10,1);
   std::copy(vals1,vals1+10,d->getPointer());
-  DataArrayInt *d2=d->getIdsNotEqual(5);
 CPPUNIT_ASSERT_EQUAL(7,d2->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,d2->getNumberOfComponents());
+  DataArrayInt *d2=d->findIdsNotEqual(5);
CPPUNIT_ASSERT_EQUAL(7,(int)d2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)d2->getNumberOfComponents());
   const int expected1[7]={0,1,3,4,7,8,9};
   for(int i=0;i<7;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],d2->getIJ(0,i));
   d->rearrange(2);
-  CPPUNIT_ASSERT_THROW(d->getIdsNotEqual(5),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(d->findIdsNotEqual(5),INTERP_KERNEL::Exception);
   const int vals2[3]={-4,5,6};
   std::vector<int> vals3(vals2,vals2+3);
   d->rearrange(1);
-  DataArrayInt *d3=d->getIdsNotEqualList(&vals3[0],&vals3[0]+vals3.size());
 CPPUNIT_ASSERT_EQUAL(5,d3->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,d3->getNumberOfComponents());
+  DataArrayInt *d3=d->findIdsNotEqualList(&vals3[0],&vals3[0]+vals3.size());
CPPUNIT_ASSERT_EQUAL(5,(int)d3->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)d3->getNumberOfComponents());
   const int expected2[5]={0,1,4,8,9};
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],d3->getIJ(0,i));
@@ -801,8 +809,8 @@ void MEDCouplingBasicsTest4::testDAIComputeOffsets1()
   d->alloc(6,1);
   std::copy(vals1,vals1+6,d->getPointer());
   d->computeOffsets();
 CPPUNIT_ASSERT_EQUAL(6,d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(6,(int)d->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],d->getIJ(0,i));
   d->decrRef();
@@ -825,14 +833,14 @@ void MEDCouplingBasicsTest4::testUMeshHexagonPrism1()
   mesh->finishInsertingCells();
   coo->decrRef();
   //
-  mesh->checkCoherency();
+  mesh->checkConsistencyLight();
   MEDCouplingFieldDouble *vols=mesh->getMeasureField(false);
 CPPUNIT_ASSERT_EQUAL(1,vols->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,vols->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(1,(int)vols->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)vols->getNumberOfComponents());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(-5.196152422706632,vols->getIJ(0,0),1e-12);
-  DataArrayDouble *bary=mesh->getBarycenterAndOwner();
 CPPUNIT_ASSERT_EQUAL(1,bary->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(3,bary->getNumberOfComponents());
+  DataArrayDouble *bary=mesh->computeCellCenterOfMass();
CPPUNIT_ASSERT_EQUAL(1,(int)bary->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)bary->getNumberOfComponents());
   const double expected1[3]={0.,0.,1.};
   for(int i=0;i<3;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],bary->getIJ(0,i),1e-12);
@@ -841,7 +849,7 @@ void MEDCouplingBasicsTest4::testUMeshHexagonPrism1()
   DataArrayInt *d3=DataArrayInt::New();
   DataArrayInt *d4=DataArrayInt::New();
   MEDCouplingUMesh *m2=mesh->buildDescendingConnectivity(d1,d2,d3,d4);
-  CPPUNIT_ASSERT_EQUAL(8,m2->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(8,(int)m2->getNumberOfCells());
   const int expected4[8][6]={{1,2,3,4,5,0},{7,6,11,10,9,8},{1,7,8,2},{2,8,9,3},{3,9,10,4},{4,10,11,5},{5,11,6,0},{0,6,7,1}};
   const INTERP_KERNEL::NormalizedCellType expected2[8]={INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4};
   const int expected3[8]={6,6,4,4,4,4,4,4};
@@ -863,7 +871,7 @@ void MEDCouplingBasicsTest4::testUMeshHexagonPrism1()
   CPPUNIT_ASSERT(INTERP_KERNEL::NORM_POLYHED==mesh->getTypeOfCell(0));
   mesh->unPolyze();
   CPPUNIT_ASSERT(INTERP_KERNEL::NORM_HEXGP12==mesh->getTypeOfCell(0));
-  CPPUNIT_ASSERT_EQUAL(13,mesh->getMeshLength());
+  CPPUNIT_ASSERT_EQUAL(13,mesh->getNodalConnectivityArrayLen());
   //
   vols->decrRef();
   bary->decrRef();
@@ -893,43 +901,43 @@ void MEDCouplingBasicsTest4::testDADCheckIsMonotonic()
 void MEDCouplingBasicsTest4::testCheckCoherencyDeeper1()
 {
   MEDCouplingUMesh *m=build3DSourceMesh_1();
-  m->checkCoherency();
-  m->checkCoherency1();
+  m->checkConsistencyLight();
+  m->checkConsistency();
   m->getNodalConnectivity()->setIJ(8,0,-1);
-  m->checkCoherency();
-  CPPUNIT_ASSERT_THROW(m->checkCoherency1(),INTERP_KERNEL::Exception);
+  m->checkConsistencyLight();
+  CPPUNIT_ASSERT_THROW(m->checkConsistency(),INTERP_KERNEL::Exception);
   m->getNodalConnectivity()->setIJ(8,0,-6);
-  m->checkCoherency();
-  CPPUNIT_ASSERT_THROW(m->checkCoherency1(),INTERP_KERNEL::Exception);
+  m->checkConsistencyLight();
+  CPPUNIT_ASSERT_THROW(m->checkConsistency(),INTERP_KERNEL::Exception);
   m->getNodalConnectivity()->setIJ(8,0,9);//9>=NbOfNodes
-  m->checkCoherency();
-  CPPUNIT_ASSERT_THROW(m->checkCoherency1(),INTERP_KERNEL::Exception);
+  m->checkConsistencyLight();
+  CPPUNIT_ASSERT_THROW(m->checkConsistency(),INTERP_KERNEL::Exception);
   m->getNodalConnectivity()->setIJ(8,0,8);//OK
-  m->checkCoherency();
-  m->checkCoherency1();
+  m->checkConsistencyLight();
+  m->checkConsistency();
   const int elts[2]={1,5};
   std::vector<int> eltsV(elts,elts+2);
   m->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size());
-  m->checkCoherency();
-  m->checkCoherency1();
+  m->checkConsistencyLight();
+  m->checkConsistency();
   m->getNodalConnectivity()->setIJ(2,0,9);//9>=NbOfNodes
-  m->checkCoherency();
-  CPPUNIT_ASSERT_THROW(m->checkCoherency1(),INTERP_KERNEL::Exception);
+  m->checkConsistencyLight();
+  CPPUNIT_ASSERT_THROW(m->checkConsistency(),INTERP_KERNEL::Exception);
   m->getNodalConnectivity()->setIJ(2,0,-3);
-  m->checkCoherency();
-  CPPUNIT_ASSERT_THROW(m->checkCoherency1(),INTERP_KERNEL::Exception);
+  m->checkConsistencyLight();
+  CPPUNIT_ASSERT_THROW(m->checkConsistency(),INTERP_KERNEL::Exception);
   m->getNodalConnectivity()->setIJ(2,0,-1);
-  m->checkCoherency();
-  CPPUNIT_ASSERT_THROW(m->checkCoherency1(),INTERP_KERNEL::Exception);//Throw because cell#0 is not a polyhedron
+  m->checkConsistencyLight();
+  CPPUNIT_ASSERT_THROW(m->checkConsistency(),INTERP_KERNEL::Exception);//Throw because cell#0 is not a polyhedron
   m->getNodalConnectivity()->setIJ(2,0,4);
-  m->checkCoherency();
-  m->checkCoherency1();
+  m->checkConsistencyLight();
+  m->checkConsistency();
   m->getNodalConnectivity()->setIJ(7,0,-1);
-  m->checkCoherency();
-  m->checkCoherency1();//OK because we are in polyhedron connec
+  m->checkConsistencyLight();
+  m->checkConsistency();//OK because we are in polyhedron connec
   m->getNodalConnectivity()->setIJ(36,0,14);
-  m->checkCoherency();
-  CPPUNIT_ASSERT_THROW(m->checkCoherency1(),INTERP_KERNEL::Exception);//Throw beacause now cell 5 is a TETRA4 (14) so mimatch of number index and static type.
+  m->checkConsistencyLight();
+  CPPUNIT_ASSERT_THROW(m->checkConsistency(),INTERP_KERNEL::Exception);//Throw because now cell 5 is a TETRA4 (14) so mismatch of number index and static type.
   m->decrRef();
 }
 
@@ -954,13 +962,13 @@ void MEDCouplingBasicsTest4::testUnPolyze2()
   m2->convertToPolyTypes(&temp[0],&temp[0]+temp.size());
   m2->unPolyze();
   CPPUNIT_ASSERT(INTERP_KERNEL::NORM_TETRA4==m2->getTypeOfCell(2));
-  CPPUNIT_ASSERT_EQUAL(40,m2->getMeshLength());
+  CPPUNIT_ASSERT_EQUAL(40,m2->getNodalConnectivityArrayLen());
   std::vector<int> temp2;
   m2->getNodeIdsOfCell(2,temp2);
   CPPUNIT_ASSERT(4==(int)temp2.size());
   CPPUNIT_ASSERT(std::equal(conn,conn+4,temp2.begin()));
-  m2->checkCoherency1();
-  MEDCouplingMesh *m3=m2->deepCpy();
+  m2->checkConsistency();
+  MEDCouplingMesh *m3=m2->deepCopy();
   m2->unPolyze();
   CPPUNIT_ASSERT(m3->isEqual(m2,1e-12));
   m3->decrRef();
@@ -981,30 +989,29 @@ void MEDCouplingBasicsTest4::testDACpyFrom1()
   //
   DataArrayDouble *d1=DataArrayDouble::New();
   CPPUNIT_ASSERT(!d->isEqual(*d1,1e-12));
-  d1->cpyFrom(*d);
+  d1->deepCopyFrom(*d);
   CPPUNIT_ASSERT(d->isEqual(*d1,1e-12));
-  d1->cpyFrom(*d);
+  d1->deepCopyFrom(*d);
   CPPUNIT_ASSERT(d->isEqual(*d1,1e-12));
   d1->rearrange(2);
   CPPUNIT_ASSERT(!d->isEqual(*d1,1e-12));
-  d1->cpyFrom(*d);
+  d1->deepCopyFrom(*d);
   CPPUNIT_ASSERT(d->isEqual(*d1,1e-12));
   //
-  DataArrayInt *d2=d->convertToIntArr();
+  MCAuto<DataArrayInt> d2=d->convertToIntArr();
   DataArrayInt *d4=DataArrayInt::New();
   CPPUNIT_ASSERT(!d2->isEqual(*d4));
-  d4->cpyFrom(*d2);
+  d4->deepCopyFrom(*d2);
   CPPUNIT_ASSERT(d2->isEqual(*d4));
-  d4->cpyFrom(*d2);
+  d4->deepCopyFrom(*d2);
   CPPUNIT_ASSERT(d2->isEqual(*d4));
   d4->rearrange(2);
   CPPUNIT_ASSERT(!d2->isEqual(*d4));
-  d4->cpyFrom(*d2);
+  d4->deepCopyFrom(*d2);
   CPPUNIT_ASSERT(d2->isEqual(*d4));
   //
   d->decrRef();
   d1->decrRef();
-  d2->decrRef();
   d4->decrRef();
 }
 
@@ -1021,8 +1028,8 @@ void MEDCouplingBasicsTest4::testDAITransformWithIndArr1()
   std::copy(tab2,tab2+12,d1->getPointer());
   //
   d1->transformWithIndArr(d->getConstPointer(),d->getConstPointer()+d->getNbOfElems());
 CPPUNIT_ASSERT_EQUAL(12,d1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,d1->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(12,(int)d1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)d1->getNumberOfComponents());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected[i],d1->getIJ(i,0));
   //
@@ -1038,8 +1045,8 @@ void MEDCouplingBasicsTest4::testDAIBuildPermArrPerLevel1()
   da->alloc(12,1);
   std::copy(arr,arr+12,da->getPointer());
   DataArrayInt *da2=da->buildPermArrPerLevel();
 CPPUNIT_ASSERT_EQUAL(12,da2->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(12,(int)da2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(i,0));
   da->decrRef();
@@ -1058,8 +1065,8 @@ void MEDCouplingBasicsTest4::testDAIOperations1()
   CPPUNIT_ASSERT_THROW(DataArrayInt::Add(da,da1),INTERP_KERNEL::Exception);//not same number of tuples/Components
   da1->rearrange(3);
   DataArrayInt *da2=DataArrayInt::Add(da,da1);
 CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());
   const int expected1[12]={1,1,8,12,9,9,14,15,14,14,12,14};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(0,i));
@@ -1074,40 +1081,40 @@ void MEDCouplingBasicsTest4::testDAIOperations1()
     CPPUNIT_ASSERT_EQUAL(expected1[i],da1->getIJ(0,i));
   da1->rearrange(1); da1->iota(2); da1->rearrange(3);
   da2=DataArrayInt::Multiply(da,da1);
 CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());
   const int expected3[12]={-2,-6,16,35,18,14,48,54,40,33,0,13};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected3[i],da2->getIJ(0,i));
   da2->decrRef();
   da->divideEqual(da1);
 CPPUNIT_ASSERT_EQUAL(4,da->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(3,da->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(4,(int)da->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)da->getNumberOfComponents());
   const int expected4[12]={0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected4[i],da->getIJ(0,i));
   std::copy(arr1,arr1+12,da->getPointer());
   da1->multiplyEqual(da);
 CPPUNIT_ASSERT_EQUAL(4,da1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(3,da1->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfComponents());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected3[i],da1->getIJ(0,i));
   da1->rearrange(1); da1->iota(2); da1->rearrange(3);
   da2=DataArrayInt::Divide(da,da1);
 CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected4[i],da2->getIJ(0,i));
   da2->decrRef();
   da1->applyInv(321);
 CPPUNIT_ASSERT_EQUAL(4,da1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(3,da1->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfComponents());
   const int expected5[12]={160,107,80,64,53,45,40,35,32,29,26,24};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected5[i],da1->getIJ(0,i));
   da1->applyDivideBy(2);
 CPPUNIT_ASSERT_EQUAL(4,da1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(3,da1->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfComponents());
   const int expected6[12]={80,53,40,32,26,22,20,17,16,14,13,12};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_EQUAL(expected6[i],da1->getIJ(0,i));
@@ -1138,33 +1145,33 @@ void MEDCouplingBasicsTest4::testEmulateMEDMEMBDC1()
   MEDCouplingUMesh *m2=m->emulateMEDMEMBDC(m1,da1,da2,da3,da4,da5,da0);
   const int expected0[47]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,36,37,32,33,34,35,38,39,40,41,42,43,44,45,46};
   const int expected1[6]={1,32,29,23,41,36};
 CPPUNIT_ASSERT_EQUAL(47,da0->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da0->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(47,(int)da0->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da0->getNumberOfComponents());
   for(int i=0;i<47;i++)
     CPPUNIT_ASSERT_EQUAL(expected0[i],da0->getIJ(0,i));
 CPPUNIT_ASSERT_EQUAL(6,da5->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da5->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(6,(int)da5->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da5->getNumberOfComponents());
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da5->getIJ(0,i));
   const int expected2[70]={0,1,2,3,4,0,5,6,7,4,8,9,1,7,10,11,12,13,14,5,15,16,17,8,18,19,20,10,21,22,23,2,13,24,25,21,16,26,27,12,19,28,29,15,22,30,31,18,36,26,28,30,24,37,32,33,34,35,38,36,39,40,41,42,37,38,43,44,45,46};
 CPPUNIT_ASSERT_EQUAL(70,da1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da1->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(70,(int)da1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfComponents());
   for(int i=0;i<70;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],da1->getIJ(0,i));
   const int expected3[17]={0,4,8,12,16,20,24,28,32,36,40,44,48,53,58,64,70};
 CPPUNIT_ASSERT_EQUAL(17,da2->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(17,(int)da2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
   for(int i=0;i<17;i++)
     CPPUNIT_ASSERT_EQUAL(expected3[i],da2->getIJ(0,i));
   const int expected4[48]={0,2,4,6,7,9,11,12,14,16,17,19,20,22,24,25,27,29,30,32,34,35,37,39,40,42,43,45,46,48,49,51,52,53,54,55,56,58,60,62,63,64,65,66,67,68,69,70};
   //const int expected4[48]={0,2,4,6,7,9,11,12,14,16,17,19,20,22,24,25,27,29,30,32,34,35,37,39,40,42,43,45,46,48,49,51,52,54,56,57,58,59,60,62,63,64,65,66,67,68,69,70};
 CPPUNIT_ASSERT_EQUAL(48,da4->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da4->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(48,(int)da4->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da4->getNumberOfComponents());
   for(int i=0;i<48;i++)
     CPPUNIT_ASSERT_EQUAL(expected4[i],da4->getIJ(0,i));
   const int expected5[70]={0,1,0,3,0,7,0,1,2,1,4,1,2,3,2,5,2,3,6,3,4,9,4,8,4,5,10,5,9,5,6,11,6,10,6,7,8,7,11,7,8,12,8,9,12,9,10,12,10,11,12,11,13,13,13,13,12,14,13,15,14,15,14,14,14,14,15,15,15,15};
 CPPUNIT_ASSERT_EQUAL(70,da3->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da3->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(70,(int)da3->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da3->getNumberOfComponents());
   for(int i=0;i<70;i++)
     CPPUNIT_ASSERT_EQUAL(expected5[i],da3->getIJ(0,i));
   //
@@ -1196,19 +1203,19 @@ void MEDCouplingBasicsTest4::testGetLevArrPerCellTypes1()
   DataArrayInt *da0=m1->getLevArrPerCellTypes(order,order+2,da1);
   const int expected0[47]={0,0,0,0,0,0,0,0,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,1,0,0,0,0,1,1,1,1,1,1,1,1,1};
   const int expected1[47]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,36,37,32,33,34,35,38,39,40,41,42,43,44,45,46};
 CPPUNIT_ASSERT_EQUAL(47,da0->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da0->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(47,(int)da0->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da0->getNumberOfComponents());
   for(int i=0;i<47;i++)
     CPPUNIT_ASSERT_EQUAL(expected0[i],da0->getIJ(0,i));
 CPPUNIT_ASSERT_EQUAL(2,da1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da1->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(2,(int)da1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfComponents());
   CPPUNIT_ASSERT_EQUAL(36,da1->getIJ(0,0));//36 TRI3
   CPPUNIT_ASSERT_EQUAL(11,da1->getIJ(1,0));//11 QUAD4
   //
   DataArrayInt *da2=da0->buildPermArrPerLevel();
   //
 CPPUNIT_ASSERT_EQUAL(47,da2->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(47,(int)da2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents());
   for(int i=0;i<47;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(0,i));
   da2->decrRef();
@@ -1223,7 +1230,7 @@ void MEDCouplingBasicsTest4::testSortCellsInMEDFileFrmt1()
 {
   MEDCouplingUMesh *m1=0;
   MEDCouplingUMesh *m=buildPointe_1(m1);
-  MEDCouplingUMesh *m2=(MEDCouplingUMesh *)m->deepCpy();
+  MEDCouplingUMesh *m2=(MEDCouplingUMesh *)m->deepCopy();
   m->setCoords(0);
   const int vals[16]={0,1,2,14,3,12,4,5,15,6,7,8,9,10,11,13};
   DataArrayInt *da=DataArrayInt::New();
@@ -1249,7 +1256,7 @@ void MEDCouplingBasicsTest4::testBuildPartAndReduceNodes1()
   DataArrayInt *da;
   MEDCouplingMesh *m2=m->buildPartAndReduceNodes(arr,arr+2,da);
   CPPUNIT_ASSERT_EQUAL(5,m2->getNumberOfNodes());
-  CPPUNIT_ASSERT_EQUAL(2,m2->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(2,(int)m2->getNumberOfCells());
   MEDCouplingFieldDouble *f=m2->getMeasureField(true);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,f->getArray()->getIJ(0,0),1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,f->getArray()->getIJ(1,0),1e-12);
@@ -1272,8 +1279,8 @@ void MEDCouplingBasicsTest4::testDAITransformWithIndArrR1()
   std::copy(tab2,tab2+12,d1->getPointer());
   //
   DataArrayInt *d3=d->transformWithIndArrR(d1->getConstPointer(),d1->getConstPointer()+d1->getNbOfElems());
 CPPUNIT_ASSERT_EQUAL(6,d3->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,d3->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(6,(int)d3->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)d3->getNumberOfComponents());
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected[i],d3->getIJ(i,0));
   d3->decrRef();
@@ -1291,12 +1298,12 @@ void MEDCouplingBasicsTest4::testDAISplitByValueRange1()
   std::copy(val1,val1+9,d->getPointer());
   DataArrayInt *ee=0,*f=0,*g=0;
   d->splitByValueRange(val2,val2+3,ee,f,g);
 CPPUNIT_ASSERT_EQUAL(9,ee->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,ee->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(9,f->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,f->getNumberOfComponents());
 CPPUNIT_ASSERT_EQUAL(2,g->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,g->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(9,(int)ee->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)ee->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(9,(int)f->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)f->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(2,(int)g->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)g->getNumberOfComponents());
   //
   const int expected1[9]={1,1,0,0,0,1,1,0,1};
   const int expected2[9]={2,1,0,3,2,3,4,1,0};
@@ -1338,19 +1345,19 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1()
   const int expected1[6]={3,1,0, 4,2,1};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],code[i]);
 CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[0]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[0]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0));
 CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[1]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[1]->getIJ(0,0));
   CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getIJ(1,0));
   idsInPflPerType[0]->decrRef();
   idsInPflPerType[1]->decrRef();
   CPPUNIT_ASSERT_EQUAL(2,(int)pfls.size());
   CPPUNIT_ASSERT(std::string("sup")==pfls[0]->getName());
 CPPUNIT_ASSERT_EQUAL(1,pfls[0]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)pfls[0]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(0,pfls[0]->getIJ(0,0));
   CPPUNIT_ASSERT(std::string("sup")==pfls[1]->getName());
 CPPUNIT_ASSERT_EQUAL(2,pfls[1]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(2,(int)pfls[1]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(0,pfls[1]->getIJ(0,0));
   CPPUNIT_ASSERT_EQUAL(1,pfls[1]->getIJ(1,0));
   pfls[0]->decrRef();
@@ -1370,16 +1377,16 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1()
   const int expected2[6]={3,1,0, 4,3,-1};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected2[i],code[i]);
 CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[0]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[0]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0));
 CPPUNIT_ASSERT_EQUAL(3,idsInPflPerType[1]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,(int)idsInPflPerType[1]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[1]->getIJ(0,0));
   CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getIJ(1,0));
   CPPUNIT_ASSERT_EQUAL(3,idsInPflPerType[1]->getIJ(2,0));
   idsInPflPerType[0]->decrRef();
   idsInPflPerType[1]->decrRef();
   CPPUNIT_ASSERT_EQUAL(1,(int)pfls.size());
 CPPUNIT_ASSERT_EQUAL(1,pfls[0]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)pfls[0]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(0,pfls[0]->getIJ(0,0));
   pfls[0]->decrRef();
   d->decrRef();
@@ -1397,15 +1404,15 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1()
   const int expected3[6]={3,2,0, 4,1,1};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_EQUAL(expected3[i],code[i]);
 CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[0]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[0]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0));
   CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[0]->getIJ(1,0));
 CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[1]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[1]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getIJ(0,0));
   idsInPflPerType[0]->decrRef();
   idsInPflPerType[1]->decrRef();
   CPPUNIT_ASSERT_EQUAL(2,(int)pfls.size());
 CPPUNIT_ASSERT_EQUAL(2,pfls[0]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(2,(int)pfls[0]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,pfls[0]->getIJ(0,0));
   CPPUNIT_ASSERT_EQUAL(0,pfls[0]->getIJ(1,0));
   CPPUNIT_ASSERT_EQUAL(0,pfls[1]->getIJ(0,0));
@@ -1426,12 +1433,12 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1()
   const int expected4[3]={4,2,0};
   for(int i=0;i<3;i++)
     CPPUNIT_ASSERT_EQUAL(expected4[i],code[i]);
 CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[0]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[0]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0));
   CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[0]->getIJ(1,0));
   idsInPflPerType[0]->decrRef();
   CPPUNIT_ASSERT_EQUAL(1,(int)pfls.size());
 CPPUNIT_ASSERT_EQUAL(2,pfls[0]->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(2,(int)pfls[0]->getNumberOfTuples());
   CPPUNIT_ASSERT_EQUAL(1,pfls[0]->getIJ(0,0));
   CPPUNIT_ASSERT_EQUAL(2,pfls[0]->getIJ(1,0));
   pfls[0]->decrRef();
@@ -1455,8 +1462,8 @@ void MEDCouplingBasicsTest4::testDAIBuildExplicitArrByRanges1()
   std::copy(vals2,vals2+6,e->getPointer());
   //
   DataArrayInt *f=d->buildExplicitArrByRanges(e);
 CPPUNIT_ASSERT_EQUAL(11,f->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,f->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(11,(int)f->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)f->getNumberOfComponents());
   const int expected1[11]={0,1,2,6,7,8,9,10,11,12,13};
   for(int i=0;i<11;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],f->getIJ(i,0));
@@ -1473,9 +1480,9 @@ void MEDCouplingBasicsTest4::testDAIComputeOffsets2()
   const int expected1[7]={0,3,8,9,11,11,19};
   d->alloc(6,1);
   std::copy(vals1,vals1+6,d->getPointer());
-  d->computeOffsets2();
 CPPUNIT_ASSERT_EQUAL(7,d->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents());
+  d->computeOffsetsFull();
CPPUNIT_ASSERT_EQUAL(7,(int)d->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents());
   for(int i=0;i<7;i++)
     CPPUNIT_ASSERT_EQUAL(expected1[i],d->getIJ(0,i));
   d->decrRef();
@@ -1519,10 +1526,10 @@ void MEDCouplingBasicsTest4::testGetDistributionOfTypes1()
   CPPUNIT_ASSERT_EQUAL(6,(int)code.size());
   CPPUNIT_ASSERT_EQUAL(3,code[0]);
   CPPUNIT_ASSERT_EQUAL(2,code[1]);
-  CPPUNIT_ASSERT_EQUAL(0,code[2]);
+  CPPUNIT_ASSERT_EQUAL(-1,code[2]);
   CPPUNIT_ASSERT_EQUAL(4,code[3]);
   CPPUNIT_ASSERT_EQUAL(3,code[4]);
-  CPPUNIT_ASSERT_EQUAL(0,code[5]);
+  CPPUNIT_ASSERT_EQUAL(-1,code[5]);
   m->decrRef();
 }
 
@@ -1539,7 +1546,7 @@ void MEDCouplingBasicsTest4::testNorm2_1()
   std::copy(tab,tab+10,d->getPointer());
   f->setArray(d);
   d->decrRef();
-  f->checkCoherency();
+  f->checkConsistencyLight();
   //
   CPPUNIT_ASSERT_DOUBLES_EQUAL(11.209371079592289,f->norm2(),1e-14);
   //
@@ -1559,7 +1566,7 @@ void MEDCouplingBasicsTest4::testNormMax1()
   std::copy(tab,tab+10,d->getPointer());
   f->setArray(d);
   d->decrRef();
-  f->checkCoherency();
+  f->checkConsistencyLight();
   //
   CPPUNIT_ASSERT_DOUBLES_EQUAL(7.8,f->normMax(),1e-14);
   //
@@ -1589,11 +1596,11 @@ void MEDCouplingBasicsTest4::testFindAndCorrectBadOriented3DExtrudedCells1()
   m->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+48);
   m->finishInsertingCells();
   //
-  std::vector<int> v;
-  m->findAndCorrectBadOriented3DExtrudedCells(v);
-  CPPUNIT_ASSERT_EQUAL(4,(int)v.size());
-  CPPUNIT_ASSERT(std::equal(v.begin(),v.end(),invalidCells));
+  DataArrayInt *v=m->findAndCorrectBadOriented3DExtrudedCells();
+ CPPUNIT_ASSERT_EQUAL(4,(int)v->getNumberOfTuples());
+  CPPUNIT_ASSERT(std::equal(v->begin(),v->end(),invalidCells));
   CPPUNIT_ASSERT(std::equal(connExp,connExp+64,m->getNodalConnectivity()->getConstPointer()));
+  v->decrRef();
   //
   m->decrRef();
 }
@@ -1622,24 +1629,22 @@ void MEDCouplingBasicsTest4::testConvertExtrudedPolyhedra1()
   m->convertExtrudedPolyhedra();
   DataArrayInt *da=m->getNodalConnectivity();
   DataArrayInt *dai=m->getNodalConnectivityIndex();
-  CPPUNIT_ASSERT_EQUAL(10,dai->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(159,da->getNbOfElems());
-  //
-  const int expected1[159]={14, 1, 2, 3, 4,
-                            18, 5, 6, 7, 8, 9, 10, 11, 12,
-                            14, 13, 14, 15, 16,
-                            31, 17, 18, 19, -1, 20, 22, 21, -1, 17, 18, 21, 20, -1, 18, 19, 22, 21, -1, 19, 17, 20,
-  22,
-                            16, 23, 24, 25, 26, 27, 28,
-                            31, 29, 30, 31, 32, 33, -1, 34, 38, 37, 36, 35, -1, 29, 30, 35, 34, -1, 30, 31, 36, 35, -1, 31, 32, 37, 36, -1, 32, 33, 38, 37,
-  -1, 33, 29, 34, 38,
-                            18, 39, 40, 41, 42, 43, 44, 45, 46,
-                            22, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
-                            31, 59, 60, 61, 62, 63, 64, 65, -1, 66, 72, 71, 70, 69, 68, 67, -1, 59, 60, 67, 66, -1, 60, 61, 68, 67, -1, 61, 62, 69, 68, -1, 62, 63, 70, 69, -1, 63, 64, 71, 70, -1, 64, 65, 72, 71, -1, 65, 59, 66, 72};
+  CPPUNIT_ASSERT_EQUAL((std::size_t)10,dai->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)159,da->getNbOfElems());
+  //
+  const int expected1[159]={14,1,2,3,4,
+                            18,5,6,7,8,9,10,11,12,
+                            14,13,14,15,16,
+                            31,17,18,19,-1,20,22,21,-1,17,20,21,18,-1,18,21,22,19,-1,19,22,20,17,
+                            16,23,24,25,26,27,28,
+                            31,29,30,31,32,33,-1,34,38,37,36,35,-1,29,34,35,30,-1,30,35,36,31,-1,31,36,37,32,-1,32,37,38,33,-1,33,38,34,29,
+                            18,39,40,41,42,43,44,45,46,
+                            22,47,48,49,50,51,52,53,54,55,56,57,58,
+                            31,59,60,61,62,63,64,65,-1,66,72,71,70,69,68,67,-1,59,66,67,60,-1,60,67,68,61,-1,61,68,69,62,-1,62,69,70,63,-1,63,70,71,64,-1,64,71,72,65,-1,65,72,66,59};
   const int expected2[10]={0,5,14,19,42,49,86,95,108,159};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+159,da->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+10,dai->getConstPointer()));
-  m->checkCoherency2();
+  m->checkConsistency();
   //
   m->decrRef();
 }
@@ -1649,10 +1654,10 @@ void MEDCouplingBasicsTest4::testNonRegressionCopyTinyStrings()
   MEDCouplingUMesh *m=build2DTargetMesh_1();
   MEDCouplingFieldDouble *f1=m->getMeasureField(true);
   f1->getArray()->setInfoOnComponent(0,"P [N/m^2]");
-  DataArrayDouble *bary=m->getBarycenterAndOwner();
-  MEDCouplingFieldDouble *f2=f1->buildNewTimeReprFromThis(ONE_TIME,false);
+  DataArrayDouble *bary=m->computeCellCenterOfMass();
+  MEDCouplingFieldDouble *f2=f1->buildNewTimeReprFromThis(NO_TIME,false);
   f2->setArray(bary);
-  CPPUNIT_ASSERT_THROW(f2->copyTinyAttrFrom(f1),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(f1->copyTinyAttrFrom(f2),INTERP_KERNEL::Exception);
   m->decrRef();
   f1->decrRef();
   bary->decrRef();
@@ -1696,7 +1701,7 @@ void MEDCouplingBasicsTest4::testUMeshBuildSetInstanceFromThis1()
   m=MEDCouplingUMesh::New("toto",2);
   m2=m->buildSetInstanceFromThis(3);
   CPPUNIT_ASSERT_EQUAL(0,m2->getNumberOfNodes());
-  CPPUNIT_ASSERT_EQUAL(0,m2->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(0,(int)m2->getNumberOfCells());
   m->decrRef();
   m2->decrRef();
 }
@@ -1706,7 +1711,7 @@ void MEDCouplingBasicsTest4::testUMeshMergeMeshesCVW1()
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
   MEDCouplingUMesh *m2=MEDCouplingUMesh::New("toto",2);
   MEDCouplingUMesh *m3=MEDCouplingUMesh::MergeUMeshes(m,m2);
-  m3->setName(m->getName());
+  m3->setName(m->getName().c_str());
   CPPUNIT_ASSERT(m->isEqual(m3,1e-12));
   m3->decrRef();
   m->decrRef();
@@ -1729,7 +1734,7 @@ void MEDCouplingBasicsTest4::testChangeUnderlyingMeshWithCMesh1()
   coordsX->decrRef();
   coordsY->decrRef();
   coordsZ->decrRef();
-  MEDCouplingMesh *mesh2=mesh->deepCpy();
+  MEDCouplingMesh *mesh2=mesh->deepCopy();
   //
   static const int ids1[9]={0,1,2,10,11,12,20,21,22};
   for(const int *myId=ids1;myId!=ids1+9;myId++)
@@ -1761,8 +1766,8 @@ void MEDCouplingBasicsTest4::testDADFindCommonTuples1()
   da->findCommonTuples(1e-2,-1,c,cI);
   const int expected1[3]={0,3,4};
   const int expected2[2]={0,3};
-  CPPUNIT_ASSERT_EQUAL(3,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(2,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)3,c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)2,cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+2,cI->getConstPointer()));
   c->decrRef();
@@ -1771,8 +1776,8 @@ void MEDCouplingBasicsTest4::testDADFindCommonTuples1()
   da->findCommonTuples(2e-1,-1,c,cI);
   const int expected3[5]={0,3,4,1,2};
   const int expected4[3]={0,3,5};
-  CPPUNIT_ASSERT_EQUAL(5,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(3,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)5,c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)3,cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+5,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected4,expected4+3,cI->getConstPointer()));
   c->decrRef();
@@ -1782,16 +1787,16 @@ void MEDCouplingBasicsTest4::testDADFindCommonTuples1()
   const double array2[12]={2.3,2.3,1.2,1.2,1.3,1.3,2.3,2.3,2.301,2.301,0.8,0.8};
   std::copy(array2,array2+12,da->getPointer());
   da->findCommonTuples(1e-2,-1,c,cI);
-  CPPUNIT_ASSERT_EQUAL(3,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(2,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)3,c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)2,cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+2,cI->getConstPointer()));
   c->decrRef();
   cI->decrRef();
   //
   da->findCommonTuples(2e-1,-1,c,cI);
-  CPPUNIT_ASSERT_EQUAL(5,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(3,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)5,c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)3,cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+5,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected4,expected4+3,cI->getConstPointer()));
   c->decrRef();
@@ -1801,16 +1806,16 @@ void MEDCouplingBasicsTest4::testDADFindCommonTuples1()
   const double array3[18]={2.3,2.3,2.3,1.2,1.2,1.2,1.3,1.3,1.3,2.3,2.3,2.3,2.301,2.301,2.301,0.8,0.8,0.8};
   std::copy(array3,array3+18,da->getPointer());
   da->findCommonTuples(1e-2,-1,c,cI);
-  CPPUNIT_ASSERT_EQUAL(3,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(2,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)3,c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)2,cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+3,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected2,expected2+2,cI->getConstPointer()));
   c->decrRef();
   cI->decrRef();
   //
   da->findCommonTuples(2e-1,-1,c,cI);
-  CPPUNIT_ASSERT_EQUAL(5,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(3,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)5,c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)3,cI->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+5,c->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected4,expected4+3,cI->getConstPointer()));
   c->decrRef();
@@ -1821,11 +1826,11 @@ void MEDCouplingBasicsTest4::testDADFindCommonTuples1()
   std::copy(array11,array11+6,da->getPointer());
   // nbOftuples=1, no common groups
   da->findCommonTuples(1e-2,-1,c,cI);
-  CPPUNIT_ASSERT_EQUAL(0,c->getNbOfElems());
-  CPPUNIT_ASSERT_EQUAL(1,cI->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)0,c->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)1,cI->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(0,cI->getIJ(0,0));
   
-  da->alloc(6,4);  //bad NumberOfComponents
+  da->alloc(6,5);  //bad NumberOfComponents
   CPPUNIT_ASSERT_THROW(da->findCommonTuples(1e-2,-1,c,cI),INTERP_KERNEL::Exception);
   
   c->decrRef();
@@ -1867,14 +1872,14 @@ void MEDCouplingBasicsTest4::testDADGetDifferentValues1()
   //
   const double expected1[4]={2.301,1.2,1.3,0.8};
   DataArrayDouble *dv=da->getDifferentValues(1e-2);
-  CPPUNIT_ASSERT_EQUAL(4,dv->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)4,dv->getNbOfElems());
   for(int i=0;i<4;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],dv->getIJ(i,0),1e-14);
   dv->decrRef();
   //
   dv=da->getDifferentValues(2e-1);
   const double expected2[3]={2.301,1.3,0.8};
-  CPPUNIT_ASSERT_EQUAL(3,dv->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)3,dv->getNbOfElems());
   for(int i=0;i<3;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],dv->getIJ(i,0),1e-14);
   dv->decrRef();
@@ -1892,12 +1897,13 @@ void MEDCouplingBasicsTest4::testDAIBuildOld2NewArrayFromSurjectiveFormat2()
   b->alloc(3,1);
   std::copy(arrI,arrI+3,b->getPointer());
   int newNbTuple=-1;
-  DataArrayInt *ret=DataArrayInt::BuildOld2NewArrayFromSurjectiveFormat2(10,a,b,newNbTuple);
+  DataArrayInt *ret=DataArrayInt::ConvertIndexArrayToO2N(10,a->begin(),b->begin(),b->end(),newNbTuple);
   const int expected[10]={0,1,2,0,3,4,5,4,6,4};
-  CPPUNIT_ASSERT_EQUAL(10,ret->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)10,ret->getNbOfElems());
   CPPUNIT_ASSERT_EQUAL(7,newNbTuple);
 CPPUNIT_ASSERT_EQUAL(1,ret->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(1,(int)ret->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(expected,expected+10,ret->getConstPointer()));
+  CPPUNIT_ASSERT_THROW(DataArrayInt::ConvertIndexArrayToO2N(9,a->begin(),b->begin(),b->end(),newNbTuple),INTERP_KERNEL::Exception);
   ret->decrRef();
   b->decrRef();
   a->decrRef();
@@ -1945,10 +1951,10 @@ void MEDCouplingBasicsTest4::testGetNodeIdsInUse1()
   DataArrayInt *arr=m1->getNodeIdsInUse(newNbOfNodes);
   const int expected[9]={-1,0,1,-1,2,3,-1,-1,-1};
   CPPUNIT_ASSERT_EQUAL(4,newNbOfNodes);
-  CPPUNIT_ASSERT_EQUAL(9,arr->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)9,arr->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected,expected+9,arr->getConstPointer()));
   DataArrayInt *arr2=arr->invertArrayO2N2N2O(newNbOfNodes);
-  CPPUNIT_ASSERT_EQUAL(4,arr2->getNbOfElems());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)4,arr2->getNbOfElems());
   const int expected2[4]={1,2,4,5};
   CPPUNIT_ASSERT(std::equal(expected2,expected2+4,arr2->getConstPointer()));
   arr2->decrRef();
@@ -1966,13 +1972,13 @@ void MEDCouplingBasicsTest4::testBuildDescendingConnec2()
   DataArrayInt *revDescIndx=DataArrayInt::New();
   //
   MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity2(desc,descIndx,revDesc,revDescIndx);
-  mesh2->checkCoherency();
+  mesh2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension());
-  CPPUNIT_ASSERT_EQUAL(13,mesh2->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,revDescIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,descIndx->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,desc->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,revDesc->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(13,(int)mesh2->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,(int)revDescIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,(int)descIndx->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)desc->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL((std::size_t)18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)revDesc->getNumberOfTuples());
   const int expected1[18]={1,2,3,4,-3,5,6, 7,8,-5,9,10,-2,11, 12,13,-7,-10};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+18,desc->getConstPointer()));
   const int expected2[6]={0,4,7,10,14,18};
@@ -2012,7 +2018,7 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp1()
   MEDCouplingUMesh *m1=m1c->buildUnstructured();
   const int subPart1[3]={3,4,5};
   MEDCouplingUMesh *m1bis=static_cast<MEDCouplingUMesh *>(m1->buildPartOfMySelf(subPart1,subPart1+3,false));
-  MEDCouplingUMesh *m2tmp=static_cast<MEDCouplingUMesh *>(m1->deepCpy());
+  MEDCouplingUMesh *m2tmp=static_cast<MEDCouplingUMesh *>(m1->deepCopy());
   const int subPart2[3]={0,1,2};
   MEDCouplingUMesh *m2=static_cast<MEDCouplingUMesh *>(m2tmp->buildPartOfMySelf(subPart2,subPart2+3,false));
   const double vec[2]={0.5,0.5};
@@ -2020,22 +2026,22 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp1()
   // End of construction of input meshes m1bis and m2 -> start of specific part of the test
   DataArrayInt *d1=0,*d2=0;
   MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1bis,m2,1e-10,d1,d2);
-  const int expected1[5]={0,1,1,2,2};
-  const int expected2[5]={0,0,1,1,2};
 CPPUNIT_ASSERT_EQUAL(5,d1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(5,d2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(5,m3->getNumberOfCells());
+  const int expected1[8]={0,0,1,1,1,2,2,2};
+  const int expected2[8]={0,-1,0,1,-1,1,2,-1};
CPPUNIT_ASSERT_EQUAL(8,(int)d1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(8,(int)d2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(8,(int)m3->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(22,m3->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
-  CPPUNIT_ASSERT(std::equal(expected1,expected1+5,d1->getConstPointer()));
-  CPPUNIT_ASSERT(std::equal(expected2,expected2+5,d2->getConstPointer()));
-  const int expected3[25]={5,17,1,16,12,5,18,1,17,13,5,19,2,18,13,5,20,2,19,14,5,21,3,20,14};
-  const int expected4[6]={0,5,10,15,20,25};
+  CPPUNIT_ASSERT(std::equal(expected1,expected1+8,d1->getConstPointer()));
+  CPPUNIT_ASSERT(std::equal(expected2,expected2+8,d2->getConstPointer()));
+  const int expected3[44]={5,17,1,16,12,5,16,0,4,5,17,12,5,18,1,17,13,5,19,2,18,13,5,17,5,6,19,13,5,20,2,19,14,5,21,3,20,14,5,19,6,7,21,14};
+  const int expected4[9]={0,5,12,17,22,28,33,38,44};
   const double expected5[44]={-1.0,2.0,1.0,2.0,2.0,2.0,4.0,2.0,-1.0,4.0,1.0,4.0,2.0,4.0,4.0,4.0,-0.5,-1.5,1.5,-1.5,2.5,-1.5,4.5,-1.5,-0.5,2.5,1.5,2.5,2.5,2.5,4.5,2.5,-0.5,2.0,1.0,2.5,1.5,2.0,2.0,2.5,2.5,2.0,4.0,2.5};
-  CPPUNIT_ASSERT_EQUAL(25,m3->getNodalConnectivity()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(6,m3->getNodalConnectivityIndex()->getNumberOfTuples());
-  CPPUNIT_ASSERT(std::equal(expected3,expected3+25,m3->getNodalConnectivity()->getConstPointer()));
-  CPPUNIT_ASSERT(std::equal(expected4,expected4+6,m3->getNodalConnectivityIndex()->getConstPointer()));
+  CPPUNIT_ASSERT_EQUAL(44,(int)m3->getNodalConnectivity()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(9,(int)m3->getNodalConnectivityIndex()->getNumberOfTuples());
+  CPPUNIT_ASSERT(std::equal(expected3,expected3+44,m3->getNodalConnectivity()->getConstPointer()));
+  CPPUNIT_ASSERT(std::equal(expected4,expected4+9,m3->getNodalConnectivityIndex()->getConstPointer()));
   for(int i=0;i<44;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected5[i],m3->getCoords()->getIJ(0,i),1e-12);
   d1->decrRef();
@@ -2108,9 +2114,9 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp2()
   MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,1e-10,d1,d2);
   const int expected1[9]={0,0,1,1,2,2,3,4,5};
   const int expected2[9]={0,2,1,3,1,3,2,3,3};
 CPPUNIT_ASSERT_EQUAL(9,d1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(9,d2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(9,m3->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(9,(int)d1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(9,(int)d2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(9,(int)m3->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(22,m3->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
   CPPUNIT_ASSERT(std::equal(expected1,expected1+9,d1->getConstPointer()));
@@ -2118,8 +2124,8 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp2()
   const int expected3[45]={5,16,13,12,15,5,15,4,5,16,5,21,2,13,16,5,16,5,6,21,5,17,14,2,21,5,21,6,7,17,5,4,18,19,5,5,5,19,10,6,5,6,10,20,7};
   const int expected4[10]={0,5,10,15,20,25,30,35,40,45};
   const double expected5[44]={0.0,0.0,1.0,0.0,1.5,0.0,2.0,0.0,0.0,1.5,1.0,1.5,1.5,1.5,2.0,1.5,0.0,3.0,1.0,3.0,1.5,3.0,2.0,3.0,0.0,0.0,1.0,0.0,2.0,0.0,0.0,1.0,1.0,1.0,2.0,1.0,0.0,3.0,1.0,3.0,2.0,3.0,1.5,1.0};
-  CPPUNIT_ASSERT_EQUAL(45,m3->getNodalConnectivity()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(10,m3->getNodalConnectivityIndex()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(45,(int)m3->getNodalConnectivity()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(10,(int)m3->getNodalConnectivityIndex()->getNumberOfTuples());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+45,m3->getNodalConnectivity()->getConstPointer()));
   CPPUNIT_ASSERT(std::equal(expected4,expected4+10,m3->getNodalConnectivityIndex()->getConstPointer()));
   for(int i=0;i<44;i++)
@@ -2187,23 +2193,23 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp3()
   DataArrayInt *d1=0,*d2=0;
   MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,1e-10,d1,d2);
   m3->unPolyze();
-  const int expected1[12]={0,1,1,2,3,3,4,5,5,6,7,7};
-  const int expected2[12]={0,0,1,2,2,3,4,4,5,6,6,7};
 CPPUNIT_ASSERT_EQUAL(12,d1->getNumberOfTuples());
 CPPUNIT_ASSERT_EQUAL(12,d2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(12,m3->getNumberOfCells());
-  CPPUNIT_ASSERT_EQUAL(88,m3->getNumberOfNodes());
+  const int expected1[16]={0,1,1,1,2,3,3,3,4,5,5,5,6,7,7,7};
+  const int expected2[16]={0,0,1,-1,2,2,3,-1,4,4,5,-1,6,6,7,-1};
CPPUNIT_ASSERT_EQUAL(16,(int)d1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(16,(int)d2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(16,(int)m3->getNumberOfCells());
+  CPPUNIT_ASSERT_EQUAL(104,m3->getNumberOfNodes());
   CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
-  CPPUNIT_ASSERT(std::equal(expected1,expected1+12,d1->getConstPointer()));
-  CPPUNIT_ASSERT(std::equal(expected2,expected2+12,d2->getConstPointer()));
-  const int expected3[100]={6,28,1,25,44,45,46,8,26,1,28,27,47,48,49,50,8,40,2,26,27,51,52,53,54,6,28,25,5,55,56,57,8,28,5,32,31,58,59,60,61,8,32,6,41,31,62,63,64,65,6,25,37,5,66,67,68,8,32,5,37,36,69,70,71,72,8,42,6,32,36,73,74,75,76,6,1,37,25,77,78,79,8,37,1,26,38,80,81,82,83,8,26,2,43,38,84,85,86,87};
-  const int expected4[13]={0,7,16,25,32,41,50,57,66,75,82,91,100};
-  const double expected5[176]={0.,0.,1.,0.,1.5,0.,0.,1.,0.,1.5,-1.,0.,-1.5,0.,0.,-1.,0.,-1.5,0.5,0.,1.25,0.,0.7071067811865476,0.7071067811865476,1.0606601717798214,1.0606601717798214,0.,0.5,0.,1.25,-0.7071067811865476,0.7071067811865476,-1.0606601717798214,1.0606601717798214,-0.5,0.,-1.25,0.,-0.7071067811865476,-0.7071067811865476,-1.0606601717798214,-1.0606601717798214,0.,-0.5,0.,-1.25,0.7071067811865476,-0.7071067811865476,1.0606601717798214,-1.0606601717798214,0.,0.,1.1,0.,1.1,1.,0.,1.,1.7,0.,1.7,1.,-1.1,1.,-1.1,0.,-1.7,0.,-1.7,1.,-1.7,-1.,-1.1,-1.,0.,-1.,1.1,-1.,1.7,-1.,1.118033988749895,1.,-1.118033988749895,1.,-1.118033988749895,-1.,1.118033988749895,-1.,0.7071067811865477,0.7071067811865476,0.5,0.,0.,0.5,1.05,0.,0.7071067811865475,0.7071067811865477,0.55,1.,1.1,0.5,1.4012585384440737,0.535233134659635,1.3,0.,1.1,0.5,1.1090169943749475,1.,0.,0.5,-0.5,0.,-0.7071067811865477,0.7071067811865476,-0.7071067811865475,0.7071067811865477,-1.05,0.,-1.1,0.5,-0.55,1.,-1.3,0.,-1.4012585384440737,0.5352331346596344,-1.1090169943749475,1.,-1.1,0.5,0.,-0.5,-0.7071067811865475,-0.7071067811865477,-0.5,0.,-1.05,0.,-0.7071067811865478,-0.7071067811865475,-0.55,-1.,-1.1,-0.5,-1.4012585384440732,-0.5352331346596354,-1.3,0.,-1.1,-0.5,-1.1090169943749475,-1.,0.7071067811865475,-0.7071067811865477,0.,-0.5,0.5,0.,0.7071067811865477,-0.7071067811865475,1.05,0.,1.1,-0.5,0.55,-1.,1.3,0.,1.4012585384440737,-0.535233134659635,1.1090169943749475,-1.,1.1,-0.5};
-  CPPUNIT_ASSERT_EQUAL(100,m3->getNodalConnectivity()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(13,m3->getNodalConnectivityIndex()->getNumberOfTuples());
-  CPPUNIT_ASSERT(std::equal(expected3,expected3+100,m3->getNodalConnectivity()->getConstPointer()));
-  CPPUNIT_ASSERT(std::equal(expected4,expected4+13,m3->getNodalConnectivityIndex()->getConstPointer()));
-  for(int i=0;i<176;i++)
+  CPPUNIT_ASSERT(std::equal(expected1,expected1+16,d1->getConstPointer()));
+  CPPUNIT_ASSERT(std::equal(expected2,expected2+16,d2->getConstPointer()));
+  const int expected3[136]={6,28,1,25,44,45,46,8,26,1,28,27,47,48,49,50,8,40,2,26,27,51,52,53,54,8,28,4,40,27,55,56,57,58,6,28,25,5,59,60,61,8,28,5,32,31,62,63,64,65,8,32,6,41,31,66,67,68,69,8,41,4,28,31,70,71,72,73,6,25,37,5,74,75,76,8,32,5,37,36,77,78,79,80,8,42,6,32,36,81,82,83,84,8,37,8,42,36,85,86,87,88,6,1,37,25,89,90,91,8,37,1,26,38,92,93,94,95,8,26,2,43,38,96,97,98,99,8,43,8,37,38,100,101,102,103};
+  const int expected4[17]={0,7,16,25,34,41,50,59,68,75,84,93,102,109,118,127,136};
+  const double expected5[208]={0.,0.,1.,0.,1.5,0.,0.,1.,0.,1.5,-1.,0.,-1.5,0.,0.,-1.,0.,-1.5,0.5,0.,1.25,0.,0.7071067811865476,0.7071067811865476,1.0606601717798214,1.0606601717798214,0.,0.5,0.,1.25,-0.7071067811865476,0.7071067811865476,-1.0606601717798214,1.0606601717798214,-0.5,0.,-1.25,0.,-0.7071067811865476,-0.7071067811865476,-1.0606601717798214,-1.0606601717798214,0.,-0.5,0.,-1.25,0.7071067811865476,-0.7071067811865476,1.0606601717798214,-1.0606601717798214,0.,0.,1.1,0.,1.1,1.,0.,1.,1.7,0.,1.7,1.,-1.1,1.,-1.1,0.,-1.7,0.,-1.7,1.,-1.7,-1.,-1.1,-1.,0.,-1.,1.1,-1.,1.7,-1.,1.118033988749895,1.,-1.118033988749895,1.,-1.118033988749895,-1.,1.118033988749895,-1.,0.7071067811865477,0.7071067811865476,0.5,0.,0.,0.5,1.05,0.,0.7071067811865475,0.7071067811865477,0.55,1.,1.1,0.5,1.4012585384440737,0.535233134659635,1.3,0.,1.1,0.5,1.1090169943749475,1.,0.,1.25,0.6123724356957946,1.369306393762915,1.1090169943749475,1.,0.55,1.,0.,0.5,-0.5,0.,-0.7071067811865477,0.7071067811865476,-0.7071067811865475,0.7071067811865477,-1.05,0.,-1.1,0.5,-0.55,1.,-1.3,0.,-1.4012585384440737,0.5352331346596344,-1.1090169943749475,1.,-1.1,0.5,-0.6123724356957941,1.3693063937629155,0.,1.25,-0.55,1.,-1.1090169943749475,1.,0.,-0.5,-0.7071067811865475,-0.7071067811865477,-0.5,0.,-1.05,0.,-0.7071067811865478,-0.7071067811865475,-0.55,-1.,-1.1,-0.5,-1.4012585384440734,-0.5352331346596354,-1.3,0.,-1.1,-0.5,-1.1090169943749475,-1.,0.,-1.25,-0.6123724356957945,-1.369306393762915,-1.1090169943749475,-1.,-0.55,-1.,0.7071067811865475,-0.7071067811865477,0.,-0.5,0.5,0.,0.7071067811865477,-0.7071067811865475,1.05,0.,1.1,-0.5,0.55,-1.,1.3,0.,1.4012585384440737,-0.535233134659635,1.1090169943749475,-1.,1.1,-0.5,0.6123724356957946,-1.369306393762915,0.,-1.25,0.55,-1.,1.1090169943749475,-1.0};
+  CPPUNIT_ASSERT_EQUAL(136,(int)m3->getNodalConnectivity()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(17,(int)m3->getNodalConnectivityIndex()->getNumberOfTuples());
+  CPPUNIT_ASSERT(std::equal(expected3,expected3+136,m3->getNodalConnectivity()->getConstPointer()));
+  CPPUNIT_ASSERT(std::equal(expected4,expected4+17,m3->getNodalConnectivityIndex()->getConstPointer()));
+  for(int i=0;i<208;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected5[i],m3->getCoords()->getIJ(0,i),1e-12);
   d1->decrRef();
   d2->decrRef();