Salome HOME
Warning hunting. Thanks of them a bug has been found !
authorgeay <anthony.geay@cea.fr>
Tue, 25 Feb 2014 10:03:21 +0000 (11:03 +0100)
committergeay <anthony.geay@cea.fr>
Tue, 25 Feb 2014 10:03:21 +0000 (11:03 +0100)
src/INTERP_KERNEL/InterpolationUtils.hxx
src/MEDCoupling/MEDCouplingUMesh.cxx

index 777387149c5fb56efdc3ae8f726c84c9f0921948..2a6808c1defc7bb919412169a71102e0615428bb 100644 (file)
@@ -734,7 +734,7 @@ namespace INTERP_KERNEL
   inline std::vector<double> reconstruct_polygon(const std::vector<double>& V)
   {
 
-    std::size_t taille=V.size();
+    int taille((int)V.size());
 
     //VB : why 6 ?
 
@@ -749,7 +749,7 @@ namespace INTERP_KERNEL
         COS[0]=1.0;
         SIN[0]=0.0;
         //angle[0]=0.0;
-        for(std::size_t i=0; i<taille/2-1;i++)
+        for(int i=0; i<taille/2-1;i++)
           {
             std::vector<double> Trigo=calcul_cos_et_sin(&Bary[0],&V[0],&V[2*(i+1)]);
             COS[i+1]=Trigo[0];
@@ -765,7 +765,7 @@ namespace INTERP_KERNEL
         Pt_ordonne.reserve(taille);
         //        std::multimap<double,int> Ordre;
         std::multimap<std::pair<double,double>,int, AngleLess> CosSin;
-        for(std::size_t i=0;i<taille/2;i++)       
+        for(int i=0;i<taille/2;i++)       
           {
             //  Ordre.insert(std::make_pair(angle[i],i));
             CosSin.insert(std::make_pair(std::make_pair(SIN[i],COS[i]),i));
index fa1da10ee484ca79aa18eae9654724ddec6d40e0..f2776bb347e72908234e0408937b1d9b4f098d02 100644 (file)
@@ -1040,10 +1040,8 @@ void MEDCouplingUMesh::convertToPolyTypes(const int *cellIdsToConvertBg, const i
     }
   else
     {
-      int *connIndex=_nodal_connec_index->getPointer();
-      int connIndexLgth=_nodal_connec_index->getNbOfElems();
-      const int *connOld=_nodal_connec->getConstPointer();
-      int connOldLgth=_nodal_connec->getNbOfElems();
+      int *connIndex(_nodal_connec_index->getPointer());
+      const int *connOld(_nodal_connec->getConstPointer());
       MEDCouplingAutoRefCountObjectPtr<DataArrayInt> connNew(DataArrayInt::New()),connNewI(DataArrayInt::New()); connNew->alloc(0,1); connNewI->alloc(1,1); connNewI->setIJ(0,0,0);
       std::vector<bool> toBeDone(nbOfCells,false);
       for(const int *iter=cellIdsToConvertBg;iter!=cellIdsToConvertEnd;iter++)
@@ -6362,8 +6360,8 @@ DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTreeFast() const
 DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(double arcDetEps) const
 {
   checkFullyDefined();
-  int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
-  if(spaceDim!=2 || spaceDim!=2)
+  int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells());
+  if(spaceDim!=2 || mDim!=2)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic : This method should be applied on mesh with mesh dimension equal to 2 and space dimension also equal to 2!");
   MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
   double *bbox(ret->getPointer());
@@ -6407,8 +6405,8 @@ DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(double arc
 DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic(double arcDetEps) const
 {
   checkFullyDefined();
-  int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
-  if(spaceDim!=2 || spaceDim!=2)
+  int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells());
+  if(spaceDim!=2 || mDim!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic : This method should be applied on mesh with mesh dimension equal to 1 and space dimension also equal to 2!");
   MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
   double *bbox(ret->getPointer());