Salome HOME
Mesh::getNumberOfCells returns std::size_t
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingFieldDiscretization.cxx
index f84df818ee2b74d0af6041621997dea69c098499..6cb1d512a16834cb9de4e9d80da79db38738c8cc 100644 (file)
@@ -1541,15 +1541,14 @@ DataArrayDouble *MEDCouplingFieldDiscretizationGauss::getLocalizationOfDiscValue
     {
       INTERP_KERNEL::GaussCoords calculator;
       //
-      const MEDCouplingGaussLocalization& cli=_loc[locIds[i]];//curLocInfo
-      INTERP_KERNEL::NormalizedCellType typ=cli.getType();
-      const std::vector<double>& wg=cli.getWeights();
+      const MEDCouplingGaussLocalization& cli(_loc[locIds[i]]);//curLocInfo
+      INTERP_KERNEL::NormalizedCellType typ(cli.getType());
+      const std::vector<double>& wg(cli.getWeights());
       calculator.addGaussInfo(typ,INTERP_KERNEL::CellModel::GetCellModel(typ).getDimension(),
           &cli.getGaussCoords()[0],(int)wg.size(),&cli.getRefCoords()[0],
           INTERP_KERNEL::CellModel::GetCellModel(typ).getNumberOfNodes());
       //
-      int nbt=parts2[i]->getNumberOfTuples();
-      for(const int *w=parts2[i]->getConstPointer();w!=parts2[i]->getConstPointer()+nbt;w++)
+      for(const int *w=parts2[i]->begin();w!=parts2[i]->end();w++)
         calculator.calculateCoords(cli.getType(),coords,spaceDim,conn+connI[*w]+1,valsToFill+spaceDim*(ptrOffsets[*w]));
     }
   ret->copyStringInfoFrom(*umesh->getCoords());
@@ -1680,10 +1679,10 @@ void MEDCouplingFieldDiscretizationGauss::checkCoherencyBetween(const MEDCouplin
           throw INTERP_KERNEL::Exception(oss.str().c_str());
         }
     }
-  int nbOfTuples=getNumberOfTuples(mesh);
+  int nbOfTuples(getNumberOfTuples(mesh));
   if(nbOfTuples!=da->getNumberOfTuples())
     {
-      std::ostringstream oss; oss << "Invalid number of tuples in the array : expecting " << nbOfTuples << " !";
+      std::ostringstream oss; oss << "Invalid number of tuples in the array : expecting " << nbOfTuples << " having " << da->getNumberOfTuples() << " !";
       throw INTERP_KERNEL::Exception(oss.str().c_str());
     }
 }