Salome HOME
number of tuples and components are now std::size_t no more int.
[tools/medcoupling.git] / src / MEDCoupling / Test / MEDCouplingBasicsTest2.cxx
index 365cea85a79f34da9a192de56da14c5baaee8498..e0abd7e1fafdb096fde66101dbf6a5e7904abdd3 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  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 "MEDCouplingBasicsTest2.hxx"
 #include "MEDCouplingUMesh.hxx"
 #include "MEDCouplingCMesh.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
 #include "MEDCouplingFieldDouble.hxx"
 #include "MEDCouplingMemArray.hxx"
 #include "MEDCouplingGaussLocalization.hxx"
@@ -31,7 +31,7 @@
 #include <functional>
 #include <iterator>
 
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
 
 void MEDCouplingBasicsTest2::testGaussPointField1()
 {
@@ -70,13 +70,13 @@ void MEDCouplingBasicsTest2::testGaussPointField1()
   f->setArray(array);
   f->setName("MyFirstFieldOnGaussPoint");
   array->decrRef();
-  f->checkCoherency();
+  f->checkConsistencyLight();
   CPPUNIT_ASSERT_DOUBLES_EQUAL(27.,f->getIJK(2,5,0),1e-14);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(16.,f->getIJK(1,5,1),1e-14);
   //
   f->clearGaussLocalizations();
   CPPUNIT_ASSERT_EQUAL(0,f->getNbOfGaussLocalization());
-  CPPUNIT_ASSERT_THROW(f->checkCoherency(),INTERP_KERNEL::Exception);
+  CPPUNIT_ASSERT_THROW(f->checkConsistencyLight(),INTERP_KERNEL::Exception);
   int ids1[4]={0,1,3,4};
   CPPUNIT_ASSERT_THROW(f->setGaussLocalizationOnCells(ids1,ids1+4,_refCoo2,_gsCoo1,_wg1),INTERP_KERNEL::Exception);
   CPPUNIT_ASSERT_EQUAL(0,f->getNbOfGaussLocalization());
@@ -91,7 +91,7 @@ void MEDCouplingBasicsTest2::testGaussPointField1()
   CPPUNIT_ASSERT_EQUAL(0,f->getGaussLocalizationIdOfOneCell(0));
   CPPUNIT_ASSERT_EQUAL(1,f->getGaussLocalizationIdOfOneCell(1));
   CPPUNIT_ASSERT_EQUAL(1,f->getGaussLocalizationIdOfOneCell(2));
-  CPPUNIT_ASSERT_THROW(f->checkCoherency(),INTERP_KERNEL::Exception);//<- cell 3 has no localization
+  CPPUNIT_ASSERT_THROW(f->checkConsistencyLight(),INTERP_KERNEL::Exception);//<- cell 3 has no localization
   int ids4[1]={3};
   std::vector<double> _gsCoo2(_gsCoo1);
   std::vector<double> _wg2(_wg1);
@@ -102,11 +102,11 @@ void MEDCouplingBasicsTest2::testGaussPointField1()
   f->getCellIdsHavingGaussLocalization(0,tmpIds);
   CPPUNIT_ASSERT_EQUAL(2,(int)tmpIds.size());
   CPPUNIT_ASSERT(std::equal(ids2,ids2+2,tmpIds.begin()));
-  CPPUNIT_ASSERT_THROW(f->checkCoherency(),INTERP_KERNEL::Exception);//<- it's always not ok because undelying array not with the good size.
-  DataArrayDouble *array2=f->getArray()->substr(0,10);
+  CPPUNIT_ASSERT_THROW(f->checkConsistencyLight(),INTERP_KERNEL::Exception);//<- it's always not ok because undelying array not with the good size.
+  DataArrayDouble *array2=f->getArray()->subArray(0,10);
   f->setArray(array2);
   array2->decrRef();
-  f->checkCoherency();//<- here it is OK
+  f->checkConsistencyLight();//<- here it is OK
   MEDCouplingFieldDouble *f2=f->clone(true);
   CPPUNIT_ASSERT(f->isEqual(f2,1e-14,1e-14));
   MEDCouplingGaussLocalization& gl1=f2->getGaussLocalization(0);
@@ -117,7 +117,7 @@ void MEDCouplingBasicsTest2::testGaussPointField1()
   gl1.setGaussCoord(1,1,tmp);
   CPPUNIT_ASSERT(f->isEqual(f2,1e-14,1e-14));
   f->decrRef();
-  f2->checkCoherency();
+  f2->checkConsistencyLight();
   //
   f2->decrRef();
   m->decrRef();
@@ -139,7 +139,7 @@ void MEDCouplingBasicsTest2::testGaussPointNEField1()
   f->setArray(array);
   array->decrRef();
   //
-  f->checkCoherency();
+  f->checkConsistencyLight();
   MEDCouplingFieldDouble *f2=f->clone(true);
   CPPUNIT_ASSERT(f->isEqual(f2,1e-14,1e-14));
   CPPUNIT_ASSERT_DOUBLES_EQUAL(21.,f->getIJK(2,0,0),1e-14);
@@ -198,7 +198,7 @@ void MEDCouplingBasicsTest2::testCellOrientation2()
   res1.clear();
   m2->arePolyhedronsNotCorrectlyOriented(res1);
   CPPUNIT_ASSERT(res1.empty());
-  m2->checkCoherency();
+  m2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(18,m2->getNumberOfCells());
   int cellIds[3]={0,6,12};
   std::vector<int> cellIds2(cellIds,cellIds+3);
@@ -230,8 +230,8 @@ void MEDCouplingBasicsTest2::testCellOrientation2()
   m5->arePolyhedronsNotCorrectlyOriented(res1);
   CPPUNIT_ASSERT(res1.empty());
   MEDCouplingFieldDouble *f3=m5->getMeasureField(false);
-  CPPUNIT_ASSERT_EQUAL(15,f3->getArray()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f3->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(15,(int)f3->getArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f3->getNumberOfComponents());
   const double *f3Ptr=f3->getArray()->getConstPointer();
   const double expected1[15]={
     0.075,0.0375,0.0375,0.075,0.075,
@@ -241,9 +241,9 @@ void MEDCouplingBasicsTest2::testCellOrientation2()
   for(int i=0;i<15;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(std::abs(expected1[i]),f3Ptr[i],1e-12);
   f3->decrRef();
-  DataArrayDouble *f4=m5->getBarycenterAndOwner();
-  CPPUNIT_ASSERT_EQUAL(15,f4->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(3,f4->getNumberOfComponents());
+  DataArrayDouble *f4=m5->computeCellCenterOfMass();
+  CPPUNIT_ASSERT_EQUAL(15,(int)f4->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(3,(int)f4->getNumberOfComponents());
   const double *f4Ptr=f4->getConstPointer();
   const double expected2[45]={
     -0.05,-0.05,0.15, 0.3666666666666667,-0.13333333333333333,0.15, 0.53333333333333333,0.033333333333333333,0.15, -0.05,0.45,0.15, 0.45,0.45,0.15,
@@ -311,16 +311,16 @@ void MEDCouplingBasicsTest2::testPolyhedronBarycenter()
   std::copy(coords,coords+27,myCoords->getPointer());
   meshN->setCoords(myCoords);
   myCoords->decrRef();
-  meshN->checkCoherency();
+  meshN->checkConsistencyLight();
   //
   std::vector<int> res1;
   meshN->arePolyhedronsNotCorrectlyOriented(res1);
   meshN->orientCorrectlyPolyhedrons();
   CPPUNIT_ASSERT(res1.empty());
   const double *ref,*daPtr;
-  DataArrayDouble *da=meshN->getBarycenterAndOwner();
-  CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(3,da->getNumberOfComponents());
+  DataArrayDouble *da=meshN->computeCellCenterOfMass();
+  CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(3,(int)da->getNumberOfComponents());
   daPtr=da->getConstPointer();
   ref=meshN->getCoords()->getConstPointer()+24;
   for(int i=0;i<3;i++)
@@ -329,7 +329,7 @@ void MEDCouplingBasicsTest2::testPolyhedronBarycenter()
   //
   const double center[]={0.,0.,0.};
   const double vec[]={0.,2.78,0.};
-  da=meshN->getBarycenterAndOwner();
+  da=meshN->computeCellCenterOfMass();
   daPtr=da->getConstPointer();
   ref=meshN->getCoords()->getConstPointer()+24;
   for(int i=0;i<3;i++)
@@ -338,7 +338,7 @@ void MEDCouplingBasicsTest2::testPolyhedronBarycenter()
   //
   meshN->rotate(center,vec,M_PI/7.);
   meshN->translate(vec);
-  da=meshN->getBarycenterAndOwner();
+  da=meshN->computeCellCenterOfMass();
   daPtr=da->getConstPointer();
   ref=meshN->getCoords()->getConstPointer()+24;
   for(int i=0;i<3;i++)
@@ -349,7 +349,7 @@ void MEDCouplingBasicsTest2::testPolyhedronBarycenter()
   const double vec2[]={4.5,9.3,2.8};
   meshN->rotate(center2,vec2,M_E);
   meshN->translate(vec2);
-  da=meshN->getBarycenterAndOwner();
+  da=meshN->computeCellCenterOfMass();
   daPtr=da->getConstPointer();
   ref=meshN->getCoords()->getConstPointer()+24;
   for(int i=0;i<3;i++)
@@ -372,9 +372,9 @@ void MEDCouplingBasicsTest2::testNormL12Integ1D()
   array->decrRef();
   //
   const double *ptr;
-  DataArrayDouble *f3=m1->getBarycenterAndOwner();
-  CPPUNIT_ASSERT_EQUAL(4,f3->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f3->getNumberOfComponents());
+  DataArrayDouble *f3=m1->computeCellCenterOfMass();
+  CPPUNIT_ASSERT_EQUAL(4,(int)f3->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f3->getNumberOfComponents());
   double expected9[4]={0.75,5.105,0.8,5.155};
   ptr=f3->getConstPointer();
    for(int i=0;i<4;i++)
@@ -382,8 +382,8 @@ void MEDCouplingBasicsTest2::testNormL12Integ1D()
   f3->decrRef();
   //
   MEDCouplingFieldDouble *f2=m1->getMeasureField(false);
-  CPPUNIT_ASSERT_EQUAL(4,f2->getArray()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(4,(int)f2->getArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
   double expected1[4]={0.5,0.21,-0.6,-0.31};
   ptr=f2->getArray()->getConstPointer();
   for(int i=0;i<4;i++)
@@ -437,23 +437,23 @@ void MEDCouplingBasicsTest2::testNormL12Integ1D()
   // Testing with 2D Curve
   m1=build2DCurveTargetMesh_3();
   f2=m1->getMeasureField(false);
-  CPPUNIT_ASSERT_EQUAL(4,f2->getArray()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(4,(int)f2->getArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
   ptr=f2->getArray()->getConstPointer();
   for(int i=0;i<4;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(sqrt(2.)*expected2[i],ptr[i],1e-12);
   f2->decrRef();
   f2=m1->getMeasureField(true);
-  CPPUNIT_ASSERT_EQUAL(4,f2->getArray()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(4,(int)f2->getArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
   ptr=f2->getArray()->getConstPointer();
   for(int i=0;i<4;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i]*sqrt(2.),ptr[i],1e-12);
   f2->decrRef();
   //bary
-  f3=m1->getBarycenterAndOwner();
-  CPPUNIT_ASSERT_EQUAL(4,f3->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(2,f3->getNumberOfComponents());
+  f3=m1->computeCellCenterOfMass();
+  CPPUNIT_ASSERT_EQUAL(4,(int)f3->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(2,(int)f3->getNumberOfComponents());
   double expected10[8]={0.75,0.75,5.105,5.105,0.8,0.8,5.155,5.155};
   ptr=f3->getConstPointer();
    for(int i=0;i<8;i++)
@@ -488,8 +488,8 @@ void MEDCouplingBasicsTest2::testAreaBary2D()
 {
   MEDCouplingUMesh *m1=build2DTargetMesh_3();
   MEDCouplingFieldDouble *f1=m1->getMeasureField(false);
-  CPPUNIT_ASSERT_EQUAL(10,f1->getArray()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(10,(int)f1->getArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
   double expected1[10]={-0.5,-1,-1.5,-0.5,-1,  0.5,1,1.5,0.5,1};
   const double *ptr=f1->getArray()->getConstPointer();
   for(int i=0;i<10;i++)
@@ -500,9 +500,9 @@ void MEDCouplingBasicsTest2::testAreaBary2D()
   for(int i=0;i<10;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(std::abs(expected1[i]),ptr[i],1e-12);
   f1->decrRef();
-  DataArrayDouble *f2=m1->getBarycenterAndOwner();
-  CPPUNIT_ASSERT_EQUAL(10,f2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents());
+  DataArrayDouble *f2=m1->computeCellCenterOfMass();
+  CPPUNIT_ASSERT_EQUAL(10,(int)f2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents());
   double expected2[20]={
     0.5,0.3333333333333333,0.5,0.5,0.5,0.77777777777777777,0.5,0.3333333333333333,0.5,0.5,
     0.5,0.3333333333333333,0.5,0.5,0.5,0.77777777777777777,0.5,0.3333333333333333,0.5,0.5,
@@ -513,15 +513,15 @@ void MEDCouplingBasicsTest2::testAreaBary2D()
   f2->decrRef();
   m1->changeSpaceDimension(3);
   f1=m1->getMeasureField(false);
-  CPPUNIT_ASSERT_EQUAL(10,f1->getArray()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(10,(int)f1->getArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
   ptr=f1->getArray()->getConstPointer();
   for(int i=0;i<10;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(std::abs(expected1[i]),ptr[i],1e-12);
   f1->decrRef();
-  f2=m1->getBarycenterAndOwner();
-  CPPUNIT_ASSERT_EQUAL(10,f2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(3,f2->getNumberOfComponents());
+  f2=m1->computeCellCenterOfMass();
+  CPPUNIT_ASSERT_EQUAL(10,(int)f2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(3,(int)f2->getNumberOfComponents());
   ptr=f2->getConstPointer();
   double expected3[30]={
     0.5,0.3333333333333333,0.,0.5,0.5,0.,0.5,0.77777777777777777,0.,0.5,0.3333333333333333,0.,0.5,0.5,0.,
@@ -611,7 +611,7 @@ void MEDCouplingBasicsTest2::testAreaBary3D()
   std::copy(coords,coords+207,myCoords->getPointer());
   meshN->setCoords(myCoords);
   myCoords->decrRef();
-  meshN->checkCoherency();
+  meshN->checkConsistencyLight();
   std::vector<int> res1;
   meshN->arePolyhedronsNotCorrectlyOriented(res1);
   meshN->orientCorrectlyPolyhedrons();
@@ -619,9 +619,9 @@ void MEDCouplingBasicsTest2::testAreaBary3D()
   meshN->arePolyhedronsNotCorrectlyOriented(res1);
   CPPUNIT_ASSERT(res1.empty());
   //
-  DataArrayDouble *da=meshN->getBarycenterAndOwner();
-  CPPUNIT_ASSERT_EQUAL(4,da->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(3,da->getNumberOfComponents());
+  DataArrayDouble *da=meshN->computeCellCenterOfMass();
+  CPPUNIT_ASSERT_EQUAL(4,(int)da->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(3,(int)da->getNumberOfComponents());
   const double *daPtr=da->getConstPointer();
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(barys[i],daPtr[i],1e-12);
@@ -689,7 +689,7 @@ void MEDCouplingBasicsTest2::testRenumberCellsForFields()
   std::copy(values2,values2+36,arr->getPointer());
   f->setArray(arr);
   arr->decrRef();
-  f->checkCoherency();
+  f->checkConsistencyLight();
   MEDCouplingFieldDouble *fCpy=f->clone(true);
   CPPUNIT_ASSERT(f->isEqual(fCpy,1e-12,1e-12));
   f->renumberCells(renumber1,false);
@@ -712,7 +712,7 @@ void MEDCouplingBasicsTest2::testRenumberCellsForFields()
   std::copy(values3,values3+36,arr->getPointer());
   f->setArray(arr);
   arr->decrRef();
-  f->checkCoherency();
+  f->checkConsistencyLight();
   fCpy=f->clone(true);
   CPPUNIT_ASSERT(f->isEqual(fCpy,1e-12,1e-12));
   f->renumberCells(renumber1,false);
@@ -742,7 +742,7 @@ void MEDCouplingBasicsTest2::testRenumberNodesForFields()
   arr->decrRef();
   const double values1[27]={7.,107.,10007.,8.,108.,10008.,9.,109.,10009.,10.,110.,10010.,11.,111.,10011.,12.,112.,10012.,13.,113.,10013.,14.,114.,10014.,15.,115.,10015.};
   std::copy(values1,values1+27,arr->getPointer());
-  f->checkCoherency();
+  f->checkConsistencyLight();
   const int renumber1[9]={0,4,1,3,5,2,6,7,8};
   double res[3];
   const double loc[]={0.5432,-0.2432, 0.5478,0.1528};
@@ -778,23 +778,23 @@ void MEDCouplingBasicsTest2::testRenumberNodesForFields()
 void MEDCouplingBasicsTest2::testConvertQuadraticCellsToLinear()
 {
   MEDCouplingUMesh *mesh=build2DTargetMesh_3();
-  mesh->checkCoherency();
+  mesh->checkConsistencyLight();
   std::set<INTERP_KERNEL::NormalizedCellType> types=mesh->getAllGeoTypes();
   CPPUNIT_ASSERT_EQUAL(5,(int)types.size());
   INTERP_KERNEL::NormalizedCellType expected1[5]={INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_TRI3, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_TRI6, INTERP_KERNEL::NORM_QUAD8};
   std::set<INTERP_KERNEL::NormalizedCellType> expected1Bis(expected1,expected1+5);
   CPPUNIT_ASSERT(expected1Bis==types);
   CPPUNIT_ASSERT(mesh->isPresenceOfQuadratic());
-  CPPUNIT_ASSERT_EQUAL(62,mesh->getMeshLength());
+  CPPUNIT_ASSERT_EQUAL(62,mesh->getNodalConnectivityArrayLen());
   MEDCouplingFieldDouble *f1=mesh->getMeasureField(false);
   //
   mesh->convertQuadraticCellsToLinear();
   CPPUNIT_ASSERT(!mesh->isPresenceOfQuadratic());
   //
-  mesh->checkCoherency();
+  mesh->checkConsistencyLight();
   MEDCouplingFieldDouble *f2=mesh->getMeasureField(false);
   CPPUNIT_ASSERT(f1->getArray()->isEqual(*f2->getArray(),1e-12));
-  CPPUNIT_ASSERT_EQUAL(48,mesh->getMeshLength());
+  CPPUNIT_ASSERT_EQUAL(48,mesh->getNodalConnectivityArrayLen());
   std::set<INTERP_KERNEL::NormalizedCellType> types2=mesh->getAllGeoTypes();
   CPPUNIT_ASSERT_EQUAL(3,(int)types2.size());
   INTERP_KERNEL::NormalizedCellType expected2[3]={INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_TRI3, INTERP_KERNEL::NORM_QUAD4};
@@ -842,8 +842,8 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith()
   CPPUNIT_ASSERT(nodeCor==0);
   mesh1->checkGeoEquivalWith(mesh2,10,1e-12,cellCor,nodeCor);//deepEqual with geo permutations
   CPPUNIT_ASSERT(cellCor);
-  CPPUNIT_ASSERT_EQUAL(10,cellCor->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,cellCor->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(10,(int)cellCor->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)cellCor->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(renum,renum+10,cellCor->getConstPointer()));
   CPPUNIT_ASSERT(nodeCor==0);
   cellCor->decrRef();
@@ -863,12 +863,12 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith()
   CPPUNIT_ASSERT(nodeCor==0);
   mesh1->checkGeoEquivalWith(mesh2,10,1e-12,cellCor,nodeCor);//deepEqual with geo permutations
   CPPUNIT_ASSERT(cellCor);
-  CPPUNIT_ASSERT_EQUAL(10,cellCor->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,cellCor->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(10,(int)cellCor->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)cellCor->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(renum,renum+10,cellCor->getConstPointer()));
   CPPUNIT_ASSERT(nodeCor);
-  CPPUNIT_ASSERT_EQUAL(11,nodeCor->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,nodeCor->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(11,(int)nodeCor->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)nodeCor->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(renum2,renum2+11,nodeCor->getConstPointer()));
   cellCor->decrRef();
   cellCor=0;
@@ -895,12 +895,12 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith()
   CPPUNIT_ASSERT(nodeCor==0);
   mesh2->checkGeoEquivalWith(mesh1,10,1e-12,cellCor,nodeCor);//deepEqual with geo permutations
   CPPUNIT_ASSERT(cellCor);
-  CPPUNIT_ASSERT_EQUAL(10,cellCor->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,cellCor->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(10,(int)cellCor->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)cellCor->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(renum3,renum3+10,cellCor->getConstPointer()));
   CPPUNIT_ASSERT(nodeCor);
-  CPPUNIT_ASSERT_EQUAL(11,nodeCor->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,nodeCor->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(11,(int)nodeCor->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)nodeCor->getNumberOfComponents());
   CPPUNIT_ASSERT(std::equal(renum2,renum2+11,nodeCor->getConstPointer()));
   cellCor->decrRef();
   cellCor=0;
@@ -942,7 +942,7 @@ void MEDCouplingBasicsTest2::testCopyTinyStringsFromOnFields()
   a1->fillWithZero();
   a1->setInfoOnComponent(0,"c");
   a1->setInfoOnComponent(1,"d");
-  DataArrayDouble *a2=a1->deepCpy();
+  DataArrayDouble *a2=a1->deepCopy();
   a2->setInfoOnComponent(0,"e");
   a2->setInfoOnComponent(1,"f");
   f->setArray(a1);
@@ -955,7 +955,7 @@ void MEDCouplingBasicsTest2::testCopyTinyStringsFromOnFields()
   m->getCoords()->setInfoOnComponent(1,"i");
   m->getCoords()->setInfoOnComponent(2,"j");
   //
-  f->checkCoherency();
+  f->checkConsistencyLight();
   MEDCouplingFieldDouble *f2=f->clone(true);
   CPPUNIT_ASSERT(f2->isEqual(f,1e-12,1e-12));
   f2->setName("smth");
@@ -1025,14 +1025,14 @@ void MEDCouplingBasicsTest2::testTryToShareSameCoordsPermute2()
   std::copy(targetCoords,targetCoords+8,myCoords->getPointer());
   m2->setCoords(myCoords);
   myCoords->decrRef();
-  m2->checkCoherency();
-  m1->checkCoherency();
+  m2->checkConsistencyLight();
+  m1->checkConsistencyLight();
   //
   const double expected1[5]={0.25,0.125,0.125,0.25,0.25};
   MEDCouplingFieldDouble *f1=m1->getMeasureField(false);
   MEDCouplingFieldDouble *f2=m2->getMeasureField(false);
-  CPPUNIT_ASSERT_EQUAL(5,f1->getArray()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f2->getArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getArray()->getNumberOfTuples());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getIJ(i,0),1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[0],f2->getIJ(0,0),1e-12);
@@ -1043,8 +1043,8 @@ void MEDCouplingBasicsTest2::testTryToShareSameCoordsPermute2()
   m2->tryToShareSameCoordsPermute(*m1,1e-12);
   f1=m1->getMeasureField(false);
   f2=m2->getMeasureField(false);
-  CPPUNIT_ASSERT_EQUAL(5,f1->getArray()->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f2->getArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getArray()->getNumberOfTuples());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getIJ(i,0),1e-12);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[0],f2->getIJ(0,0),1e-12);
@@ -1121,7 +1121,7 @@ void MEDCouplingBasicsTest2::testGetMaxValue1()
   f->setArray(a1);
   f->setEndArray(a2);
   f->setEndTime(3.,3,4);
-  f->checkCoherency();
+  f->checkConsistencyLight();
   //
   CPPUNIT_ASSERT_DOUBLES_EQUAL(8.,f->getMaxValue(),1e-14);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,f->getMinValue(),1e-14);
@@ -1153,9 +1153,9 @@ void MEDCouplingBasicsTest2::testSubstractInPlaceDM1()
   f1->setArray(array);
   array->decrRef();
   //
-  CPPUNIT_ASSERT_EQUAL(10,f1->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(20,f1->getNumberOfValues());
+  CPPUNIT_ASSERT_EQUAL(10,(int)f1->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(2,(int)f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(20,(int)f1->getNumberOfValues());
   //
   const int renum[]={0,2,3,1,4,5,6,8,7,9};
   mesh2->renumberCells(renum,false);
@@ -1307,13 +1307,13 @@ void MEDCouplingBasicsTest2::testGetIdsInRange1()
   f1->setArray(array);
   array->decrRef();
   //
-  f1->checkCoherency();
-  DataArrayInt *da=f1->getIdsInRange(2.9,7.1);
+  f1->checkConsistencyLight();
+  DataArrayInt *da=f1->findIdsInRange(2.9,7.1);
   CPPUNIT_ASSERT_EQUAL((std::size_t)5,da->getNbOfElems());
   const int expected1[5]={2,3,5,7,9};
   CPPUNIT_ASSERT(std::equal(expected1,expected1+5,da->getConstPointer()));
   da->decrRef();
-  da=f1->getIdsInRange(8.,12.);
+  da=f1->findIdsInRange(8.,12.);
   CPPUNIT_ASSERT_EQUAL((std::size_t)4,da->getNbOfElems());
   const int expected2[4]={1,4,6,8};
   CPPUNIT_ASSERT(std::equal(expected2,expected2+4,da->getConstPointer()));
@@ -1339,8 +1339,8 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   const int part1[3]={2,1,4};
   MEDCouplingFieldDouble *f2=f1->buildSubPart(part1,part1+3);
   f2->zipCoords();
-  CPPUNIT_ASSERT_EQUAL(3,f2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(3,(int)f2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents());
   const double expected1[6]={5.,105.,4.,104.,7.,107.};
   for(int i=0;i<6;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected1[i],1e-12);
@@ -1349,7 +1349,7 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
   MEDCouplingUMesh *m2C=dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
-  CPPUNIT_ASSERT_EQUAL(13,m2C->getMeshLength());
+  CPPUNIT_ASSERT_EQUAL(13,m2C->getNodalConnectivityArrayLen());
   const double expected2[12]={0.2, -0.3, 0.7, -0.3, 0.2, 0.2, 0.7, 0.2, 0.2, 0.7, 0.7, 0.7};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],m2C->getCoords()->getIJ(0,i),1.e-12);
@@ -1371,8 +1371,8 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   array->decrRef();
   const int part2[2]={1,2};
   f2=f1->buildSubPart(part2,part2+2);
-  CPPUNIT_ASSERT_EQUAL(4,f2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(4,(int)f2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents());
   const double expected5[8]={4.,104.,5.,105.,7.,107.,8.,108.};
   for(int i=0;i<8;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected5[i],1e-12);
@@ -1381,7 +1381,7 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
   m2C=dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
-  CPPUNIT_ASSERT_EQUAL(8,m2C->getMeshLength());
+  CPPUNIT_ASSERT_EQUAL(8,m2C->getNodalConnectivityArrayLen());
   for(int i=0;i<8;i++)//8 is not an error
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],m2C->getCoords()->getIJ(0,i),1.e-12);
   CPPUNIT_ASSERT(std::equal(expected3,expected3+4,m2C->getNodalConnectivity()->getConstPointer()+4));
@@ -1395,8 +1395,8 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   std::copy(part3,part3+2,arrr->getPointer());
   f2=f1->buildSubPart(arrr);
   arrr->decrRef();
-  CPPUNIT_ASSERT_EQUAL(4,f2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(4,(int)f2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents());
   for(int i=0;i<8;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected5[i],1e-12);
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getNumberOfCells());
@@ -1404,7 +1404,7 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
   m2C=dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
-  CPPUNIT_ASSERT_EQUAL(8,m2C->getMeshLength());
+  CPPUNIT_ASSERT_EQUAL(8,m2C->getNodalConnectivityArrayLen());
   for(int i=0;i<8;i++)//8 is not an error
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],m2C->getCoords()->getIJ(0,i),1.e-12);
   CPPUNIT_ASSERT(std::equal(expected3,expected3+4,m2C->getNodalConnectivity()->getConstPointer()+4));
@@ -1414,8 +1414,8 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   //
   const int part4[3]={1,2,4};
   f2=f1->buildSubPart(part4,part4+3);
-  CPPUNIT_ASSERT_EQUAL(6,f2->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(6,(int)f2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents());
   const double expected6[12]={4.,104.,5.,105.,7.,107.,8.,108.,10.,110.,11.,111.};
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected6[i],1e-12);
@@ -1424,7 +1424,7 @@ void MEDCouplingBasicsTest2::testBuildSubPart1()
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
   CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
   m2C=dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
-  CPPUNIT_ASSERT_EQUAL(13,m2C->getMeshLength());
+  CPPUNIT_ASSERT_EQUAL(13,m2C->getNodalConnectivityArrayLen());
   for(int i=0;i<12;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],m2C->getCoords()->getIJ(0,i),1.e-12);
   CPPUNIT_ASSERT(std::equal(expected3,expected3+4,m2C->getNodalConnectivity()->getConstPointer()+4));
@@ -1448,12 +1448,12 @@ void MEDCouplingBasicsTest2::testDoublyContractedProduct1()
   std::copy(arr1,arr1+30,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   MEDCouplingFieldDouble *f2=f1->doublyContractedProduct();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(3906.56,f2->getIJ(i,0),1e-9);
   f2->decrRef();
@@ -1476,12 +1476,12 @@ void MEDCouplingBasicsTest2::testDeterminant1()
   f1->setArray(array);
   array->decrRef();
   //4 components
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   MEDCouplingFieldDouble *f2=f1->determinant();
-  f2->checkCoherency();
+  f2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(CONST_ON_TIME_INTERVAL,f2->getTimeDiscretization());
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfValues());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfValues());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(-2.42,f2->getIJ(i,0),1e-13);
   f2->decrRef();
@@ -1498,12 +1498,12 @@ void MEDCouplingBasicsTest2::testDeterminant1()
   std::copy(arr2,arr2+54,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  CPPUNIT_ASSERT_THROW(f1->checkCoherency(),INTERP_KERNEL::Exception);//no end array specified !
+  CPPUNIT_ASSERT_THROW(f1->checkConsistencyLight(),INTERP_KERNEL::Exception);//no end array specified !
   //
   f2=f1->determinant();
   CPPUNIT_ASSERT_EQUAL(LINEAR_TIME,f2->getTimeDiscretization());
-  CPPUNIT_ASSERT_EQUAL(1,f2->getArray()->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(9,f2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getArray()->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(9,(int)f2->getNumberOfTuples());
   for(int i=0;i<9;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(137.335,f2->getIJ(i,0),1e-10);
   f2->decrRef();
@@ -1515,12 +1515,12 @@ void MEDCouplingBasicsTest2::testDeterminant1()
   std::copy(arr3,arr3+54,array->getPointer());
   f1->setEndArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   f2=f1->determinant();
-  f2->checkCoherency();
+  f2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(LINEAR_TIME,f2->getTimeDiscretization());
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(9,f2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(9,(int)f2->getNumberOfTuples());
   int it,order;
   CPPUNIT_ASSERT_DOUBLES_EQUAL(2.3,f2->getTime(it,order),1e-12);
   CPPUNIT_ASSERT_EQUAL(5,it); CPPUNIT_ASSERT_EQUAL(6,order);
@@ -1544,12 +1544,12 @@ void MEDCouplingBasicsTest2::testDeterminant1()
   f1->setArray(array);
   array->decrRef();
   //
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   f2=f1->determinant();
-  f2->checkCoherency();
+  f2->checkConsistencyLight();
   CPPUNIT_ASSERT_EQUAL(ONE_TIME,f2->getTimeDiscretization());
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(7.8,f2->getTime(it,order),1e-12);
   CPPUNIT_ASSERT_EQUAL(10,it); CPPUNIT_ASSERT_EQUAL(2,order);
   for(int i=0;i<5;i++)
@@ -1571,12 +1571,12 @@ void MEDCouplingBasicsTest2::testEigenValues1()
   std::copy(arr1,arr1+30,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   MEDCouplingFieldDouble *f2=f1->eigenValues();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(3,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(3,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   const double expected1[3]={13.638813677891717,-4.502313844635971,-2.2364998332557486};
   for(int i=0;i<5;i++)
     {
@@ -1601,12 +1601,12 @@ void MEDCouplingBasicsTest2::testEigenVectors1()
   std::copy(arr1,arr1+30,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   MEDCouplingFieldDouble *f2=f1->eigenVectors();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(9,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(9,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   const double expected1[9]={
     0.5424262364180696, 0.5351201064614425, 0.6476266283176001,//eigenvect 0
     0.7381111277307373, 0.06458838384003074, -0.6715804522117897,//eigenvect 1
@@ -1641,12 +1641,12 @@ void MEDCouplingBasicsTest2::testInverse1()
   std::copy(arr1,arr1+45,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   MEDCouplingFieldDouble *f2=f1->inverse();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(9,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(9,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   const double expected1[9]={-2.6538108356290113, 2.855831037649208, -1.1111111111111067, 3.461891643709813, -4.775022956841121, 2.2222222222222143, -1.1111111111111054, 2.222222222222214, -1.1111111111111072};
   for(int i=0;i<5;i++)
     {
@@ -1668,12 +1668,12 @@ void MEDCouplingBasicsTest2::testInverse1()
   std::copy(arr3,arr3+30,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   f2=f1->inverse();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(6,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(6,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   const double expected3[6]={-0.3617705098531818, -0.8678630828458127, -0.026843764174972983, 0.5539957431465833, 0.13133439560823013, -0.05301294502145887};
   for(int i=0;i<5;i++)
     {
@@ -1692,12 +1692,12 @@ void MEDCouplingBasicsTest2::testInverse1()
   std::copy(arr2,arr2+20,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   f2=f1->inverse();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(4,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(4,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   const double expected2[4]={-1.8595041322314059, 0.9504132231404963, 1.404958677685951, -0.49586776859504156};
   for(int i=0;i<5;i++)
     {
@@ -1723,12 +1723,12 @@ void MEDCouplingBasicsTest2::testTrace1()
   std::copy(arr1,arr1+45,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   MEDCouplingFieldDouble *f2=f1->trace();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(15.9,f2->getIJ(i,0),1e-13);
   f2->decrRef();
@@ -1739,12 +1739,12 @@ void MEDCouplingBasicsTest2::testTrace1()
   std::copy(arr3,arr3+30,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   f2=f1->trace();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(25.8,f2->getIJ(i,0),1e-13);
   f2->decrRef();
@@ -1755,12 +1755,12 @@ void MEDCouplingBasicsTest2::testTrace1()
   std::copy(arr2,arr2+20,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   f2=f1->trace();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(5.7,f2->getIJ(i,0),1e-13);
   f2->decrRef();
@@ -1780,12 +1780,12 @@ void MEDCouplingBasicsTest2::testDeviator1()
   std::copy(arr1,arr1+30,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   MEDCouplingFieldDouble *f2=f1->deviator();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(6,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(6,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   const double expected1[6]={-1.1,0.,1.1,4.5,5.6,6.7};
   for(int i=0;i<5;i++)
     {
@@ -1813,12 +1813,12 @@ void MEDCouplingBasicsTest2::testMagnitude1()
   std::copy(arr1,arr1+25,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   MEDCouplingFieldDouble *f2=f1->magnitude();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(8.3606219864313918,f2->getIJ(i,0),1e-13);
   f2->decrRef();
@@ -1838,20 +1838,20 @@ void MEDCouplingBasicsTest2::testMaxPerTuple1()
   std::copy(arr1,arr1+25,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   MEDCouplingFieldDouble *f2=f1->maxPerTuple();
-  f2->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples());
+  f2->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples());
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(5.6,f2->getIJ(i,0),1e-13);
   f2->decrRef();
   //
   DataArrayInt *d2I=0;
   DataArrayDouble *d2=array->maxPerTupleWithCompoId(d2I);
-  CPPUNIT_ASSERT_EQUAL(1,d2->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,d2->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)d2->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)d2->getNumberOfTuples());
   const int expected2[5]={4,3,2,0,1};
   for(int i=0;i<5;i++)
     {
@@ -1875,19 +1875,19 @@ void MEDCouplingBasicsTest2::testChangeNbOfComponents()
   std::copy(arr1,arr1+25,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   f1->changeNbOfComponents(3,7.77);
-  f1->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(3,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
+  f1->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(3,(int)f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
   const double expected1[15]={1.2,2.3,3.4, 1.2,3.4,4.5, 3.4,4.5,5.6, 5.6,1.2,2.3, 4.5,5.6,1.2};
   for(int i=0;i<15;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getIJ(0,i),1e-13);
   f1->changeNbOfComponents(4,7.77);
-  f1->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(4,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
+  f1->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(4,(int)f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
   const double expected2[20]={1.2,2.3,3.4,7.77, 1.2,3.4,4.5,7.77, 3.4,4.5,5.6,7.77, 5.6,1.2,2.3,7.77, 4.5,5.6,1.2,7.77};
   for(int i=0;i<20;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],f1->getIJ(0,i),1e-13);
@@ -1907,12 +1907,12 @@ void MEDCouplingBasicsTest2::testSortPerTuple1()
   std::copy(arr1,arr1+25,array->getPointer());
   f1->setArray(array);
   array->decrRef();
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   //
   f1->sortPerTuple(true);
-  f1->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
+  f1->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
   for(int i=0;i<5;i++)
     {
       CPPUNIT_ASSERT_DOUBLES_EQUAL(arr1[0],f1->getIJ(i,0),1e-13);
@@ -1923,9 +1923,9 @@ void MEDCouplingBasicsTest2::testSortPerTuple1()
     }
   //
   f1->sortPerTuple(false);
-  f1->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
+  f1->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
   for(int i=0;i<5;i++)
     {
       CPPUNIT_ASSERT_DOUBLES_EQUAL(arr1[4],f1->getIJ(i,0),1e-13);
@@ -2040,9 +2040,9 @@ void MEDCouplingBasicsTest2::testGetEdgeRatioField1()
   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(m1->getNumberOfCells(),f1->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(m1->getNumberOfCells(),(int)f1->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
   const double expected1[5]={1.,1.4142135623730951, 1.4142135623730951,1.,1.};
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getIJ(i,0),1e-14);
@@ -2051,9 +2051,9 @@ void MEDCouplingBasicsTest2::testGetEdgeRatioField1()
   //
   m1=build3DSurfTargetMesh_1();
   f1=m1->getEdgeRatioField();
-  CPPUNIT_ASSERT_EQUAL(m1->getNumberOfCells(),f1->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(m1->getNumberOfCells(),(int)f1->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
   const double expected2[5]={1.4142135623730951, 1.7320508075688772, 1.7320508075688772, 1.4142135623730951, 1.4142135623730951};
   for(int i=0;i<5;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],f1->getIJ(i,0),1e-14);
@@ -2069,12 +2069,12 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3()
   f1->setMesh(m);
   f1->setName("myField");
   f1->fillFromAnalytic(1,"y+x");
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   CPPUNIT_ASSERT(std::string(f1->getName())=="myField");
   CPPUNIT_ASSERT(f1->getTypeOfField()==ON_CELLS);
   CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME);
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples());
   double values1[5]={-0.1,0.23333333333333336,0.56666666666666665,0.4,0.9};
   const double *tmp=f1->getArray()->getConstPointer();
   std::transform(tmp,tmp+5,values1,values1,std::minus<double>());
@@ -2087,11 +2087,11 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3()
   f1->setMesh(m);
   f1->setEndTime(1.2,3,4);
   f1->fillFromAnalytic(1,"y+2*x");
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES);
   CPPUNIT_ASSERT(f1->getTimeDiscretization()==CONST_ON_TIME_INTERVAL);
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples());
   double values2[9]={-0.9,0.1,1.1,-0.4,0.6,1.6,0.1,1.1,2.1};
   tmp=f1->getArray()->getConstPointer();
   std::transform(tmp,tmp+9,values2,values2,std::minus<double>());
@@ -2103,11 +2103,11 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3()
   f1->setMesh(m);
   f1->setEndTime(1.2,3,4);
   f1->fillFromAnalytic(1,"2.*x+y");
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES);
   CPPUNIT_ASSERT(f1->getTimeDiscretization()==LINEAR_TIME);
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples());
   tmp=f1->getArray()->getConstPointer();
   double values2Bis[9]={-0.9,0.1,1.1,-0.4,0.6,1.6,0.1,1.1,2.1};
   double values2BisBis[9];
@@ -2125,11 +2125,11 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3()
   f1=MEDCouplingFieldDouble::New(ON_NODES,NO_TIME);
   f1->setMesh(m);
   f1->fillFromAnalytic(2,"(x+y)*IVec+2*(x+y)*JVec");
-  f1->checkCoherency();
+  f1->checkConsistencyLight();
   CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES);
   CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME);
-  CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(2,(int)f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples());
   double values3[18]={-0.6,-1.2,-0.1,-0.2,0.4,0.8,-0.1,-0.2,0.4,0.8,0.9,1.8,0.4,0.8,0.9,1.8,1.4,2.8};
   tmp=f1->getArray()->getConstPointer();
   std::transform(tmp,tmp+18,values3,values3,std::minus<double>());
@@ -2160,15 +2160,15 @@ void MEDCouplingBasicsTest2::testFieldDoubleOpEqual1()
   CPPUNIT_ASSERT_THROW((*f1)=0.07,INTERP_KERNEL::Exception);
   f1->setMesh(m);
   (*f1)=0.07;
-  f1->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
+  f1->checkConsistencyLight();
+  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(0.07,f1->getIJ(i,0),1e-16);
   (*f1)=0.09;
-  f1->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples());
+  f1->checkConsistencyLight();
+  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(0.09,f1->getIJ(i,0),1e-16);
   f1->decrRef();
@@ -2177,13 +2177,13 @@ void MEDCouplingBasicsTest2::testFieldDoubleOpEqual1()
   f1->setEndTime(4.5,2,3);
   f1->setMesh(m);
   (*f1)=0.08;
-  f1->checkCoherency();
-  CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples());
+  f1->checkConsistencyLight();
+  CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples());
   for(int i=0;i<9;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08,f1->getIJ(i,0),1e-16);
-  CPPUNIT_ASSERT_EQUAL(1,f1->getEndArray()->getNumberOfComponents());
-  CPPUNIT_ASSERT_EQUAL(9,f1->getEndArray()->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)f1->getEndArray()->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(9,(int)f1->getEndArray()->getNumberOfTuples());
   for(int i=0;i<9;i++)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08,f1->getEndArray()->getIJ(i,0),1e-16);
   f1->decrRef();
@@ -2246,22 +2246,22 @@ void MEDCouplingBasicsTest2::testAreaBary3D2()
   std::transform(tmpConn,tmpConn+8,tmpConn,std::bind2nd(std::plus<int>(),6));
   mesh->insertNextCell(INTERP_KERNEL::NORM_PYRA5,5,tmpConn);
   mesh->finishInsertingCells();
-  mesh->checkCoherency();
+  mesh->checkConsistencyLight();
   bool isMerged;
   int newNebOfNodes;
   DataArrayInt *da=mesh->mergeNodes(1e-7,isMerged,newNebOfNodes);
   da->decrRef();
   CPPUNIT_ASSERT_EQUAL(12,newNebOfNodes);
   MEDCouplingFieldDouble *vols=mesh->getMeasureField(true);
-  CPPUNIT_ASSERT_EQUAL(3,vols->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(1,vols->getNumberOfComponents());
+  CPPUNIT_ASSERT_EQUAL(3,(int)vols->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(1,(int)vols->getNumberOfComponents());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(volHexa8,vols->getIJ(0,0),1e-6);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(volPenta6,vols->getIJ(1,0),1e-7);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(volPyra5,vols->getIJ(2,0),1e-7);
   vols->decrRef();
-  DataArrayDouble *bary=mesh->getBarycenterAndOwner();
-  CPPUNIT_ASSERT_EQUAL(3,bary->getNumberOfTuples());
-  CPPUNIT_ASSERT_EQUAL(3,bary->getNumberOfComponents());
+  DataArrayDouble *bary=mesh->computeCellCenterOfMass();
+  CPPUNIT_ASSERT_EQUAL(3,(int)bary->getNumberOfTuples());
+  CPPUNIT_ASSERT_EQUAL(3,(int)bary->getNumberOfComponents());
   CPPUNIT_ASSERT_DOUBLES_EQUAL(baryHexa8[0],bary->getIJ(0,0),1e-11);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(baryHexa8[1],bary->getIJ(0,1),1e-11);
   CPPUNIT_ASSERT_DOUBLES_EQUAL(baryHexa8[2],bary->getIJ(0,2),1e-11);