]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Warning hunting
authorageay <ageay>
Wed, 25 Jan 2012 08:40:21 +0000 (08:40 +0000)
committerageay <ageay>
Wed, 25 Jan 2012 08:40:21 +0000 (08:40 +0000)
18 files changed:
src/INTERP_KERNEL/Bases/InterpKernelException.cxx
src/INTERP_KERNEL/Bases/InterpKernelException.hxx
src/INTERP_KERNEL/DirectedBoundingBox.cxx
src/INTERP_KERNEL/ExprEval/InterpKernelExprParser.cxx
src/INTERP_KERNEL/ExprEval/InterpKernelValue.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DComposedEdge.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeInfLin.hxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.cxx
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx
src/INTERP_KERNEL/InterpKernelCellSimplify.cxx
src/INTERP_KERNEL/Interpolation3DSurf.cxx
src/INTERP_KERNEL/PolygonAlgorithms.txx
src/INTERP_KERNEL/SplitterTetra.txx
src/INTERP_KERNEL/TransformedTriangle.cxx
src/INTERP_KERNEL/TransformedTriangleIntersect.cxx
src/INTERP_KERNEL/UnitTetraIntersectionBary.cxx

index 00c8d2f26e73db14a56a6b965d1865e61679b6b4..6bb9285f55099b90b1b9ce3a54554efb85316ee9 100644 (file)
 
 #include <iostream>
 
-INTERP_KERNEL::Exception::Exception(const char *what):_reason(what)
+INTERP_KERNEL::Exception::Exception(const char *reason):_reason(reason)
 {
-  std::cerr << "AN INTERP_KERNEL::EXCEPTION HAS BEEN THROWN : " << what << "**********" << std::endl;
+  std::cerr << "AN INTERP_KERNEL::EXCEPTION HAS BEEN THROWN : " << reason << "**********" << std::endl;
 }
 
-INTERP_KERNEL::Exception::Exception(const char *what, const char *file, int line):_reason(what)
+INTERP_KERNEL::Exception::Exception(const char *reason, const char *file, int line):_reason(reason)
 {
 }
 
index 298c05aa6414932ebbdcde155df8ed0713d6cdb4..6482d3864b93a4152cd04ae4bcaa6c417e794942 100644 (file)
@@ -30,8 +30,8 @@ namespace INTERP_KERNEL
   class INTERPKERNEL_EXPORT Exception : public std::exception
   {
   public:
-    Exception(const char *what);
-    Exception(const char *what, const char *file, int line);
+    Exception(const char *reason);
+    Exception(const char *reason, const char *file, int line);
     ~Exception() throw ();
     const char *what() const throw();
   protected:
index 5a1c4e1485c314f43916af7466dd4748a51ff5d3..98ebf830ad2bf280a472f775aa0746fe88058e1a 100644 (file)
@@ -159,13 +159,13 @@ T[i2] += s * ( t1 - tau * t2);\
     __DMP( "Solved = " << solved );
     if ( _dim == 3 ) {
       __DMP( " Eigen " << __TENSOR(0,0)<<", "<<__TENSOR(1,1)<<", "<<__TENSOR(2,2) );
-      for ( int i=0; i <3; ++i )
-        __DMP( i << ": " << __AXIS(i)[0] << ", " << __AXIS(i)[1] << ", " << __AXIS(i)[2] );
+      for ( int ii=0; ii <3; ++ii )
+        __DMP( ii << ": " << __AXIS(ii)[0] << ", " << __AXIS(ii)[1] << ", " << __AXIS(ii)[2] );
     }
     else {
       __DMP( " Eigen " << __TENSOR(0,0) << ", " << __TENSOR(1,1) );
-      for ( int i=0; i <2; ++i )
-        __DMP( i << ": " << __AXIS(i)[0] << ", " << __AXIS(i)[1] );
+      for ( int ii=0; ii <2; ++ii )
+        __DMP( ii << ": " << __AXIS(ii)[0] << ", " << __AXIS(ii)[1] );
     }
 
     return solved;
index 4bc2354c81d951230e708dd2e815a2a64d38738c..184e9ba24357c3e514f59f59a197bc5c21fc5be3 100644 (file)
@@ -77,7 +77,7 @@ void LeafExprVal::fillValue(Value *val) const throw(INTERP_KERNEL::Exception)
 void LeafExprVal::replaceValues(const std::vector<double>& valuesInExpr) throw(INTERP_KERNEL::Exception)
 {
   int pos=(int)_value;
-  int lgth=valuesInExpr.size();
+  int lgth=(int)valuesInExpr.size();
   if(pos>=lgth || pos<0)
     throw INTERP_KERNEL::Exception("LeafExprVal::replaceValues : Big Problem detected ! Send expression to Salome support with expression !");
   _value=valuesInExpr[pos];
@@ -105,7 +105,7 @@ void LeafExprVar::prepareExprEvaluation(const std::vector<std::string>& vars) co
         }
       return;
     }
-  _fast_pos=iter-vars.begin();
+  _fast_pos=(int)std::distance(vars.begin(),iter);
 }
 
 void LeafExprVar::prepareExprEvaluationVec() const throw(INTERP_KERNEL::Exception)
@@ -412,21 +412,21 @@ void ExprParser::parseUnaryFunc() throw(INTERP_KERNEL::Exception)
   if(pos2!=std::string::npos && pos3!=std::string::npos)
     return ;//Bracket group is not alone, can't conclude not recursively.
   std::string newExp2=_expr.substr(pos1+1,_expr.length()-pos1-2);
-  int nbOfParamsInFunc=std::count(newExp2.begin(),newExp2.end(),',')+1;
+  std::size_t nbOfParamsInFunc=std::count(newExp2.begin(),newExp2.end(),',')+1;
   if(pos3!=std::string::npos)
-    _func_btw_sub_expr.push_back(FunctionsFactory::buildFuncFromString(funcName.c_str(),nbOfParamsInFunc));
+    _func_btw_sub_expr.push_back(FunctionsFactory::buildFuncFromString(funcName.c_str(),(int)nbOfParamsInFunc));
   else
     {
-      int lgth=funcName.length();
+      std::size_t lgth=funcName.length();
       char tmp[2]; tmp[1]='\0';
-      for(int i=0;i<lgth;i++)
+      for(std::size_t i=0;i<lgth;i++)
         {
           tmp[0]=funcName[i];
-          _func_btw_sub_expr.push_back(FunctionsFactory::buildFuncFromString(tmp,nbOfParamsInFunc));
+          _func_btw_sub_expr.push_back(FunctionsFactory::buildFuncFromString(tmp,(int)nbOfParamsInFunc));
         }
     }
   std::size_t pos6=0;
-  for(int i=0;i<nbOfParamsInFunc;i++)
+  for(std::size_t i=0;i<nbOfParamsInFunc;i++)
     {
       std::size_t pos5=newExp2.find_first_of(',',pos6);
       std::size_t len=std::string::npos;
@@ -765,7 +765,7 @@ void ExprParser::checkBracketsParity() const throw(INTERP_KERNEL::Exception)
               std::ostringstream errMsg;
               char MSGTYP1[]="Error in brackets : closing brackets ')' before openning '('";
               errMsg << EXPR_PARSE_ERR_MSG << MSGTYP1;
-              LocateError(errMsg,_expr,iter-_expr.begin());
+              LocateError(errMsg,_expr,(int)std::distance(_expr.begin(),iter));
               throw INTERP_KERNEL::Exception(errMsg.str().c_str());
             }
           curLevel--;
index 33561be76200679f27612a53b5c63deecc2d9c5c..de1c8fdf86c01495755bce3ac010e5e069c7ef06 100644 (file)
@@ -193,9 +193,9 @@ void ValueUnit::setDouble(double val) throw(INTERP_KERNEL::Exception)
 
 void ValueUnit::setVarname(int fastPos, const std::string& var) throw(INTERP_KERNEL::Exception)
 {
-  double add,mult;
-  const short *projInBase=UnitDataBase::_uniqueMapForExpr.getInfoForUnit(var,add,mult);
-  _data.setInfo(projInBase,add,mult);
+  double add,mul;
+  const short *projInBase=UnitDataBase::_uniqueMapForExpr.getInfoForUnit(var,add,mul);
+  _data.setInfo(projInBase,add,mul);
 }
 
 void ValueUnit::positive() throw(INTERP_KERNEL::Exception)
index 60f1fa52825403eaeb7ea690a6b98bbe76daa16c..2ded60b4d098e866f2e77097d5c5aeee7343222b 100644 (file)
@@ -386,9 +386,9 @@ bool ComposedEdge::isInOrOut(Node *nodeToTest) const
   EdgeInfLin *e1=new EdgeInfLin(nodeToTest,radialDistrib[i]+radialDistrib3[i]/2.);
   double ref=e1->getCharactValue(*nodeToTest);
   std::set< IntersectElement > inOutSwitch;
-  for(std::list<ElementaryEdge *>::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++)
+  for(std::list<ElementaryEdge *>::const_iterator iter4=_sub_edges.begin();iter4!=_sub_edges.end();iter4++)
     {
-      ElementaryEdge *val=(*iter);
+      ElementaryEdge *val=(*iter4);
       if(val)
         {
           Edge *e=val->getPtr();
@@ -413,11 +413,11 @@ bool ComposedEdge::isInOrOut(Node *nodeToTest) const
     }
   e1->decrRef();
   bool ret=false;
-  for(std::set< IntersectElement >::iterator iter=inOutSwitch.begin();iter!=inOutSwitch.end();iter++)
+  for(std::set< IntersectElement >::iterator iter4=inOutSwitch.begin();iter4!=inOutSwitch.end();iter4++)
     {
-      if((*iter).getVal1()<ref)
+      if((*iter4).getVal1()<ref)
         {
-          if((*iter).getNodeOnly()->getLoc()==ON_1)
+          if((*iter4).getNodeOnly()->getLoc()==ON_1)
             ret=!ret;
         }
       else
index 6b06899a49f83e4e2dcdc638456ca15f119196bf..e3178aef59ff0db350599eb63634ad10b0929778 100644 (file)
@@ -260,7 +260,7 @@ void IntersectElement::setNode(Node *node) const
     {
       if(_node)
         ((Node *)_node)->decrRef();
-      ((IntersectElement *)(this))->_node=node;
+      (const_cast<IntersectElement *>(this))->_node=node;
       if(_node)
         _node->incrRef();
     }
@@ -457,8 +457,8 @@ bool Edge::changeStartNodeWith(Node *otherStartNode) const
     return true;
   if(_start->isEqual(*otherStartNode))
     {
-      (((Edge *)this)->_start)->decrRef();//un-const cast Ok thanks to 2 lines above.
-      (((Edge *)this)->_start)=otherStartNode;
+      ((const_cast<Edge *>(this))->_start)->decrRef();//un-const cast Ok thanks to 2 lines above.
+      ((const_cast<Edge *>(this))->_start)=otherStartNode;
       _start->incrRef();
       return true;
     }
@@ -471,8 +471,8 @@ bool Edge::changeStartNodeWithAndKeepTrack(Node *otherStartNode, std::vector<Nod
     return true;
   if(_start->isEqualAndKeepTrack(*otherStartNode,track))
     {
-      (((Edge *)this)->_start)->decrRef();//un-const cast Ok thanks to 2 lines above.
-      (((Edge *)this)->_start)=otherStartNode;
+      ((const_cast<Edge *>(this))->_start)->decrRef();//un-const cast Ok thanks to 2 lines above.
+      ((const_cast<Edge *>(this))->_start)=otherStartNode;
       otherStartNode->incrRef();
       return true;
     }
@@ -485,8 +485,8 @@ bool Edge::changeEndNodeWith(Node *otherEndNode) const
     return true;
   if(_end->isEqual(*otherEndNode))
     {
-      (((Edge *)this)->_end)->decrRef();
-      (((Edge *)this)->_end)=otherEndNode;
+      ((const_cast<Edge *>(this))->_end)->decrRef();
+      ((const_cast<Edge *>(this))->_end)=otherEndNode;
       _end->incrRef();
       return true;
     }
@@ -499,8 +499,8 @@ bool Edge::changeEndNodeWithAndKeepTrack(Node *otherEndNode, std::vector<Node *>
     return true;
   if(_end->isEqualAndKeepTrack(*otherEndNode,track))
     {
-      (((Edge *)this)->_end)->decrRef();
-      (((Edge *)this)->_end)=otherEndNode;
+      ((const_cast<Edge *>(this))->_end)->decrRef();
+      ((const_cast<Edge *>(this))->_end)=otherEndNode;
       otherEndNode->incrRef();
       return true;
     }
@@ -521,7 +521,7 @@ void Edge::addSubEdgeInVector(Node *start, Node *end, ComposedEdge& vec) const
   if(start==_start && end==_end)
     {
       incrRef();
-      vec.pushBack((Edge *)this);
+      vec.pushBack(const_cast<Edge *>(this));
       return ;
     }
   vec.pushBack(buildEdgeLyingOnMe(start,end,true));
@@ -691,19 +691,19 @@ bool Edge::Intersect(const Edge *f1, const Edge *f2, EdgeIntersector *intersecto
       std::vector<Node *>::reverse_iterator iterR=newNodes.rbegin();
       f1->addSubEdgeInVector(f1->getStartNode(),*iter,outValForF1);
       f2->addSubEdgeInVector(f2->getStartNode(),order?*iter:*iterR,outValForF2);
-      for(std::vector<Node *>::iterator iter=newNodes.begin();iter!=newNodes.end();iter++,iterR++)
+      for(std::vector<Node *>::iterator iter2=newNodes.begin();iter2!=newNodes.end();iter2++,iterR++)
         {
-          if((iter+1)==newNodes.end())
+          if((iter2+1)==newNodes.end())
             {
-              f1->addSubEdgeInVector(*iter,f1->getEndNode(),outValForF1);
-              (*iter)->decrRef();
-              f2->addSubEdgeInVector(order?*iter:*iterR,f2->getEndNode(),outValForF2);
+              f1->addSubEdgeInVector(*iter2,f1->getEndNode(),outValForF1);
+              (*iter2)->decrRef();
+              f2->addSubEdgeInVector(order?*iter2:*iterR,f2->getEndNode(),outValForF2);
             }
           else
             {
-              f1->addSubEdgeInVector(*iter,*(iter+1),outValForF1);
-              (*iter)->decrRef();
-              f2->addSubEdgeInVector(order?*iter:*iterR,order?*(iter+1):*(iterR+1),outValForF2);
+              f1->addSubEdgeInVector(*iter2,*(iter2+1),outValForF1);
+              (*iter2)->decrRef();
+              f2->addSubEdgeInVector(order?*iter2:*iterR,order?*(iter2+1):*(iterR+1),outValForF2);
             }
         }
       return true;
@@ -756,9 +756,9 @@ bool Edge::SplitOverlappedEdges(const Edge *e1, const Edge *e2, Node *nS, Node *
             e2->incrRef(); e2->incrRef();
             outVal1.resize(3);
             outVal1.setValueAt(0,e1->buildEdgeLyingOnMe(e1->getStartNode(),nS));
-            outVal1.setValueAt(1,(Edge*)e2,direction);
+            outVal1.setValueAt(1,const_cast<Edge*>(e2),direction);
             outVal1.setValueAt(2,e1->buildEdgeLyingOnMe(nE,e1->getEndNode()));
-            outVal2.pushBack((Edge*)e2); e2->declareOn();
+            outVal2.pushBack(const_cast<Edge*>(e2)); e2->declareOn();
             return true;
           }
         else
@@ -785,42 +785,42 @@ bool Edge::SplitOverlappedEdges(const Edge *e1, const Edge *e2, Node *nS, Node *
       return true;
     case OUT_BEFORE*OFFSET_FOR_TYPEOFLOCINEDGE+OUT_AFTER:  // OUT_BEFORE - OUT_AFTER
       e1->incrRef(); e1->incrRef();
-      outVal1.pushBack((Edge*)e1);
+      outVal1.pushBack(const_cast<Edge*>(e1));
       outVal2.resize(3);
       outVal2.setValueAt(direction?0:2,e1->buildEdgeLyingOnMe(nS,e1->getStartNode(),direction));
-      outVal2.setValueAt(1,(Edge*)e1,direction); e1->declareOn();
+      outVal2.setValueAt(1,const_cast<Edge*>(e1),direction); e1->declareOn();
       outVal2.setValueAt(direction?2:0,e1->buildEdgeLyingOnMe(e1->getEndNode(),nE,direction));
       return true;
     case START*OFFSET_FOR_TYPEOFLOCINEDGE+END:             // START - END
       e1->incrRef(); e1->incrRef();
-      outVal1.pushBack((Edge*)e1);
-      outVal2.pushBack((Edge*)e1,direction); e1->declareOn();
+      outVal1.pushBack(const_cast<Edge*>(e1));
+      outVal2.pushBack(const_cast<Edge*>(e1),direction); e1->declareOn();
       return true;
     case START*OFFSET_FOR_TYPEOFLOCINEDGE+OUT_AFTER:       // START - OUT_AFTER
       e1->incrRef(); e1->incrRef();
-      outVal1.pushBack((Edge*)e1);
+      outVal1.pushBack(const_cast<Edge*>(e1));
       outVal2.resize(2);
-      outVal2.setValueAt(direction?0:1,(Edge*)e1,direction); e1->declareOn();
+      outVal2.setValueAt(direction?0:1,const_cast<Edge*>(e1),direction); e1->declareOn();
       outVal2.setValueAt(direction?1:0,e1->buildEdgeLyingOnMe(e1->getEndNode(),nE,direction));
       return true;
     case INSIDE*OFFSET_FOR_TYPEOFLOCINEDGE+END:            // INSIDE - END
       e2->incrRef(); e2->incrRef();
       outVal1.pushBack(e1->buildEdgeLyingOnMe(e1->getStartNode(),nS,true));
-      outVal1.pushBack((Edge*)e2,direction);
-      outVal2.pushBack((Edge*)e2); e2->declareOn();
+      outVal1.pushBack(const_cast<Edge*>(e2),direction);
+      outVal2.pushBack(const_cast<Edge*>(e2)); e2->declareOn();
       return true;
     case OUT_BEFORE*OFFSET_FOR_TYPEOFLOCINEDGE+END:        // OUT_BEFORE - END
       e1->incrRef(); e1->incrRef();
-      outVal1.pushBack((Edge*)e1);
+      outVal1.pushBack(const_cast<Edge*>(e1));
       outVal2.resize(2);
       outVal2.setValueAt(direction?0:1,e1->buildEdgeLyingOnMe(nS,e1->getStartNode(),direction));
-      outVal2.setValueAt(direction?1:0,(Edge*)e1,direction); e1->declareOn();
+      outVal2.setValueAt(direction?1:0,const_cast<Edge*>(e1),direction); e1->declareOn();
       return true;
     case START*OFFSET_FOR_TYPEOFLOCINEDGE+INSIDE:          // START - INSIDE
       e2->incrRef(); e2->incrRef();
-      outVal1.pushBack((Edge*)e2,direction);
+      outVal1.pushBack(const_cast<Edge*>(e2),direction);
       outVal1.pushBack(e1->buildEdgeLyingOnMe(nE,e1->getEndNode()));
-      outVal2.pushBack((Edge*)e2); e2->declareOn();
+      outVal2.pushBack(const_cast<Edge*>(e2)); e2->declareOn();
       return true;
     case INSIDE*OFFSET_FOR_TYPEOFLOCINEDGE+START:          // INSIDE - START
       outVal1.resize(2);
index 06e2d053b0feb7b801a0f2acecbe7573d1d0c46b..b9a8f0cddf01a5a47218bf299145d36cd9793cf8 100644 (file)
@@ -356,12 +356,12 @@ std::list< IntersectElement > ArcCSegIntersector::getIntersectionsCharacteristic
     {
       double x=(_cross*_dy)/_drSq+center[0];
       double y=(-_cross*_dx)/_drSq+center[1];
-      Node *intersect=new Node(x,y); intersect->declareOnTangent();
-      bool i_1S=_e1.getStartNode()->isEqual(*intersect);
-      bool i_1E=_e1.getEndNode()->isEqual(*intersect);
-      bool i_2S=_e2.getStartNode()->isEqual(*intersect);
-      bool i_2E=_e2.getEndNode()->isEqual(*intersect);
-      ret.push_back(IntersectElement(_e1.getCharactValue(*intersect),_e2.getCharactValue(*intersect),i_1S,i_1E,i_2S,i_2E,intersect,_e1,_e2,keepOrder()));
+      Node *intersect3=new Node(x,y); intersect3->declareOnTangent();
+      bool i_1S=_e1.getStartNode()->isEqual(*intersect3);
+      bool i_1E=_e1.getEndNode()->isEqual(*intersect3);
+      bool i_2S=_e2.getStartNode()->isEqual(*intersect3);
+      bool i_2E=_e2.getEndNode()->isEqual(*intersect3);
+      ret.push_back(IntersectElement(_e1.getCharactValue(*intersect3),_e2.getCharactValue(*intersect3),i_1S,i_1E,i_2S,i_2E,intersect3,_e1,_e2,keepOrder()));
     }
   return ret;
 }
index 48d494e6294739e499ae1c4e60e5bb1769f2b2b7..af24ff9bb72603b32939552813bf4b3185c367e6 100644 (file)
@@ -32,7 +32,7 @@ namespace INTERP_KERNEL
     bool isIn(double characterVal) const { return true; }
     void dynCastFunction(const EdgeLin * &seg,
                          const EdgeArcCircle * &arcSeg) const { seg=this; }
-  private:
+  protected:
     ~EdgeInfLin() { }
   };
 }
index a62faf2669a5ceaed03aa6b5ba958ad8fe269e64..a844c3d3ceb54fd610da012d44fd426853070017 100644 (file)
@@ -76,7 +76,7 @@ bool Node::isEqualAndKeepTrack(const Node& other, std::vector<Node *>& track) co
 {
   bool ret=isEqual(other);
   if(ret)
-    track.push_back((Node *)&other);
+    track.push_back(const_cast<Node *>(&other));
   return ret;
 }
 
@@ -155,7 +155,7 @@ void Node::fillGlobalInfoAbs(const std::map<INTERP_KERNEL::Node *,int>& mapThis,
       *nodeId=(*it).second;
       return;
     }
-  int id=addCoo.size()/2;
+  int id=(int)addCoo.size()/2;
   addCoo.push_back(fact*_coords[0]+baryX);
   addCoo.push_back(fact*_coords[1]+baryY);
   *nodeId=offset2+id;
index 9dd4497556a36e8842d0277938d5806b5fba238e..19c8a80019ddaa9006939b019b32a1ab7b873301 100644 (file)
@@ -69,8 +69,8 @@ QuadraticPolygon::~QuadraticPolygon()
 QuadraticPolygon *QuadraticPolygon::buildLinearPolygon(std::vector<Node *>& nodes)
 {
   QuadraticPolygon *ret=new QuadraticPolygon;
-  int size=nodes.size();
-  for(int i=0;i<size;i++)
+  std::size_t size=nodes.size();
+  for(std::size_t i=0;i<size;i++)
     {
       ret->pushBack(new EdgeLin(nodes[i],nodes[(i+1)%size]));
       nodes[i]->decrRef();
@@ -81,8 +81,8 @@ QuadraticPolygon *QuadraticPolygon::buildLinearPolygon(std::vector<Node *>& node
 QuadraticPolygon *QuadraticPolygon::buildArcCirclePolygon(std::vector<Node *>& nodes)
 {
   QuadraticPolygon *ret=new QuadraticPolygon;
-  int size=nodes.size();
-  for(int i=0;i<size/2;i++)
+  std::size_t size=nodes.size();
+  for(std::size_t i=0;i<size/2;i++)
     {
       EdgeLin *e1,*e2;
       e1=new EdgeLin(nodes[i],nodes[i+size/2]);
@@ -291,14 +291,14 @@ void QuadraticPolygon::splitAbs(QuadraticPolygon& other, const std::map<INTERP_K
  */
 void QuadraticPolygon::buildFromCrudeDataArray(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges)
 {
-  int nbOfSeg=std::distance(descBg,descEnd);
-  for(int i=0;i<nbOfSeg;i++)
+  std::size_t nbOfSeg=std::distance(descBg,descEnd);
+  for(std::size_t i=0;i<nbOfSeg;i++)
     {
       bool direct=descBg[i]>0;
       int edgeId=abs(descBg[i])-1;
       const std::vector<int>& subEdge=intersectEdges[edgeId];
-      int nbOfSubEdges=subEdge.size()/2;
-      for(int j=0;j<nbOfSubEdges;j++)
+      std::size_t nbOfSubEdges=subEdge.size()/2;
+      for(std::size_t j=0;j<nbOfSubEdges;j++)
         {
           Node *start=(*mapp.find(direct?subEdge[2*j]:subEdge[2*nbOfSubEdges-2*j-1])).second;
           Node *end=(*mapp.find(direct?subEdge[2*j+1]:subEdge[2*nbOfSubEdges-2*j-2])).second;
@@ -485,7 +485,7 @@ void QuadraticPolygon::intersectForPerimeterAdvanced(const QuadraticPolygon& oth
 {
   polThis.resize(size());
   polOther.resize(other.size());
-  IteratorOnComposedEdge it1((QuadraticPolygon *)this);
+  IteratorOnComposedEdge it1(const_cast<QuadraticPolygon *>(this));
   int edgeId=0;
   for(it1.first();!it1.finished();it1.next(),edgeId++)
     {
@@ -499,7 +499,7 @@ void QuadraticPolygon::intersectForPerimeterAdvanced(const QuadraticPolygon& oth
       tmp.dispatchPerimeter(polThis[edgeId]);
     }
   //
-  IteratorOnComposedEdge it2((QuadraticPolygon *)&other);
+  IteratorOnComposedEdge it2(const_cast<QuadraticPolygon *>(&other));
   edgeId=0;
   for(it2.first();!it2.finished();it2.next(),edgeId++)
     {
@@ -524,7 +524,7 @@ void QuadraticPolygon::intersectForPerimeterAdvanced(const QuadraticPolygon& oth
 void QuadraticPolygon::intersectForPoint(const QuadraticPolygon& other, std::vector< int >& numberOfCreatedPointsPerEdge) const
 {
   numberOfCreatedPointsPerEdge.resize(size());
-  IteratorOnComposedEdge it1((QuadraticPolygon *)this);
+  IteratorOnComposedEdge it1(const_cast<QuadraticPolygon *>(this));
   int edgeId=0;
   for(it1.first();!it1.finished();it1.next(),edgeId++)
     {
@@ -721,7 +721,7 @@ void QuadraticPolygon::closePolygons(std::list<QuadraticPolygon *>& pol2Zip, con
  */
 bool QuadraticPolygon::amIAChanceToBeCompletedBy(const QuadraticPolygon& pol1Splitted,const QuadraticPolygon& pol2NotSplitted, bool& direction)
 {
-  IteratorOnComposedEdge it((QuadraticPolygon *)&pol1Splitted);
+  IteratorOnComposedEdge it(const_cast<QuadraticPolygon *>(&pol1Splitted));
   bool found=false;
   Node *n=getEndNode();
   ElementaryEdge *cur=it.current();
@@ -770,7 +770,7 @@ std::list<QuadraticPolygon *>::iterator QuadraticPolygon::fillAsMuchAsPossibleWi
                                                                                    std::list<QuadraticPolygon *>::iterator iEnd,
                                                                                    bool direction)
 {
-  IteratorOnComposedEdge it((QuadraticPolygon *)&pol1Splitted);
+  IteratorOnComposedEdge it(const_cast<QuadraticPolygon *>(&pol1Splitted));
   bool found=false;
   Node *n=getEndNode();
   ElementaryEdge *cur;
index d8d5e6ae9b8222e72b679583671db4bd28b053d8..15f0c6858515fd47a70bf02977589194cf7129ba 100644 (file)
@@ -126,8 +126,8 @@ int *CellSimplify::getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, co
   std::vector<int> faces;
   for(unsigned j=0;j<nbOfFaces;j++)
     {
-      INTERP_KERNEL::NormalizedCellType type;
-      unsigned offset=cm.fillSonCellNodalConnectivity2(j,conn,lgth,work,type);
+      INTERP_KERNEL::NormalizedCellType type2;
+      unsigned offset=cm.fillSonCellNodalConnectivity2(j,conn,lgth,work,type2);
       //
       int *tmp2=new int[offset];
       tmp2[0]=work[0];
@@ -141,15 +141,15 @@ int *CellSimplify::getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, co
           continue;
         }
       int tmp3;
-      faces.push_back(tryToUnPoly2D(CellModel::GetCellModel(type).isQuadratic(),tmp2,newPos,work,tmp3));
+      faces.push_back(tryToUnPoly2D(CellModel::GetCellModel(type2).isQuadratic(),tmp2,newPos,work,tmp3));
       delete [] tmp2;
       //
       work+=newPos;
       *work++=-1;
     }
   std::copy(faces.begin(),faces.end(),--work);
-  retNbOfFaces=faces.size();
-  retLgth=std::distance(tmp,work);
+  retNbOfFaces=(int)faces.size();
+  retLgth=(int)std::distance(tmp,work);
   return tmp;
 }
 
@@ -162,7 +162,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPoly3D(const int *conn, i
 {
   std::set<int> nodes(conn,conn+lgth);
   nodes.erase(-1);
-  int nbOfNodes=nodes.size();
+  int nbOfNodes=(int)nodes.size();
   int magicNumber=100*nbOfNodes+nbOfFaces;
   switch(magicNumber)
     {
@@ -215,9 +215,9 @@ bool CellSimplify::orientOppositeFace(const int *baseFace, int *retConn, const i
           sideEdges[i]=r;
         }
       //end reverse sideFace
-      std::set< std::pair<int,int> > baseEdgesS(baseEdges.begin(),baseEdges.end());
-      std::set< std::pair<int,int> > sideEdgesS(sideEdges.begin(),sideEdges.end());
-      std::set_intersection(baseEdgesS.begin(),baseEdgesS.end(),sideEdgesS.begin(),sideEdgesS.end(),std::back_insert_iterator< std::vector< std::pair<int,int> > >(tmp));
+      std::set< std::pair<int,int> > baseEdgesS2(baseEdges.begin(),baseEdges.end());
+      std::set< std::pair<int,int> > sideEdgesS2(sideEdges.begin(),sideEdges.end());
+      std::set_intersection(baseEdgesS2.begin(),baseEdgesS2.end(),sideEdgesS2.begin(),sideEdgesS2.end(),std::back_insert_iterator< std::vector< std::pair<int,int> > >(tmp));
       if(tmp.empty())
         return false;
     }
@@ -237,11 +237,11 @@ bool CellSimplify::orientOppositeFace(const int *baseFace, int *retConn, const i
     }
   if(!found)
     return false;
-  int pos=std::distance(baseEdges.begin(),std::find(baseEdges.begin(),baseEdges.end(),tmp[0]));
+  int pos=(int)std::distance(baseEdges.begin(),std::find(baseEdges.begin(),baseEdges.end(),tmp[0]));
   std::vector< std::pair<int,int> >::iterator it=std::find(oppEdges.begin(),oppEdges.end(),pInOpp);
   if(it==oppEdges.end())//the opposite edge of side face is not found opposite face ... maybe problem of orientation of polyhedron
     return false;
-  int pos2=std::distance(oppEdges.begin(),it);
+  int pos2=(int)std::distance(oppEdges.begin(),it);
   int offset=pos-pos2;
   if(offset<0)
     offset+=lgthBaseFace;
@@ -326,20 +326,20 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHex8(const int *conn,
 
 INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHexp12(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth)
 {
-  int nbOfHexagon=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_POLYGON);
-  int nbOfQuad=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4);
+  std::size_t nbOfHexagon=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_POLYGON);
+  std::size_t nbOfQuad=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4);
   if(nbOfQuad==6 && nbOfHexagon==2)
     {
       const int *hexag0=std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_POLYGON);
-      int hexg0Id=std::distance(conn+lgth,hexag0);
+      std::size_t hexg0Id=std::distance(conn+lgth,hexag0);
       const int *hexag1=std::find(hexag0+1,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_POLYGON);
-      int hexg1Id=std::distance(conn+lgth,hexag1);
+      std::size_t hexg1Id=std::distance(conn+lgth,hexag1);
       const int *connHexag0=conn+5*hexg0Id;
-      int lgthH0=std::distance(connHexag0,std::find(connHexag0,conn+lgth,-1));
+      std::size_t lgthH0=std::distance(connHexag0,std::find(connHexag0,conn+lgth,-1));
       if(lgthH0==6)
         {
           const int *connHexag1=conn+5*hexg0Id+7+(hexg1Id-hexg0Id-1)*5;
-          int lgthH1=std::distance(connHexag1,std::find(connHexag1,conn+lgth,-1));
+          std::size_t lgthH1=std::distance(connHexag1,std::find(connHexag1,conn+lgth,-1));
           if(lgthH1==6)
             {
               std::vector<int> tmp;
@@ -371,15 +371,15 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyHexp12(const int *con
  */
 INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPenta6(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth)
 {
-  int nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3);
-  int nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4);
+  std::size_t nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3);
+  std::size_t nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4);
   if(nbOfTriFace==2 && nbOfQuadFace==3)
     {
-      int tri3_0=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3));
-      int tri3_1=std::distance(conn+lgth,std::find(conn+lgth+tri3_0+1,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3));
+      std::size_t tri3_0=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3));
+      std::size_t tri3_1=std::distance(conn+lgth,std::find(conn+lgth+tri3_0+1,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3));
       const int *tri_0=0,*tri_1=0;
       const int *w=conn;
-      for(int i=0;i<5;i++)
+      for(std::size_t i=0;i<5;i++)
         {
           if(i==tri3_0)
             tri_0=w;
@@ -415,14 +415,14 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPenta6(const int *con
  */
 INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const int *conn, int nbOfFaces, int lgth, int *retConn, int& retLgth)
 {
-  int nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3);
-  int nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4);
+  std::size_t nbOfTriFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_TRI3);
+  std::size_t nbOfQuadFace=std::count(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4);
   if(nbOfTriFace==4 && nbOfQuadFace==1)
     {
-      int quad4_pos=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4));
+      std::size_t quad4_pos=std::distance(conn+lgth,std::find(conn+lgth,conn+lgth+nbOfFaces,(int)INTERP_KERNEL::NORM_QUAD4));
       const int *quad4=0;
       const int *w=conn;
-      for(int i=0;i<5 && quad4==0;i++)
+      for(std::size_t i=0;i<5 && quad4==0;i++)
         {
           if(i==quad4_pos)
             quad4=w;
@@ -433,7 +433,7 @@ INTERP_KERNEL::NormalizedCellType CellSimplify::tryToUnPolyPyra5(const int *conn
       w=conn;
       bool ok=true;
       int point=-1;
-      for(int i=0;i<5 && ok;i++)
+      for(std::size_t i=0;i<5 && ok;i++)
         {
           if(i!=quad4_pos)
             {
index e24f0a7310c191ad856656ef3ad0e4a6c6237af0..957816859216ec32e35191e42f86ad91396183f7 100644 (file)
@@ -34,27 +34,27 @@ namespace INTERP_KERNEL
   /**
      \brief  Function used to set the options for the intersection calculation
      \details The following options can be modified:
-     -# Intersection_type: the type of algorithm to be used in the computation of the cell-cell intersections.
+     -# intersectionType: the type of algorithm to be used in the computation of the cell-cell intersections.
      - Values: Triangle, Convex.
      - Default: Triangle.
-     -# MedianPlane: Position of the median plane where both cells will be projected
+     -# medianPlan: Position of the median plane where both cells will be projected
      - Values: between 0 and 1.
      - Default: 0.5.
-     -# DoRotate: rotate the coordinate system such that the target cell is in the Oxy plane.
+     -# doRotat: rotate the coordinate system such that the target cell is in the Oxy plane.
      - Values: true (necessarilly if Intersection_type=Triangle), false.
      - Default: true (as default Intersection_type=Triangle)
-     -# Precision: Level of precision of the computations is precision times the characteristic size of the mesh.
+     -# precision: Level of precision of the computations is precision times the characteristic size of the mesh.
      - Values: positive real number.
      - Default: 1.0E-12.
-     -# PrintLevel: Level of verboseness during the computations.
+     -# printLevel: Level of verboseness during the computations.
      - Values: interger between 0 and 3.
      - Default: 0.
   */
-  void Interpolation3DSurf::setOptions(double precision, int printLevel, double medianPlane
-                                       IntersectionType intersectionType, bool doRotate, int orientation)
+  void Interpolation3DSurf::setOptions(double precision, int printLevel, double medianPlan, 
+                                       IntersectionType intersectionType, bool doRotat, int orientation)
   {
     InterpolationPlanar<Interpolation3DSurf>::setOptions(precision,printLevel,intersectionType, orientation);
-    InterpolationPlanar<Interpolation3DSurf>::setDoRotate(doRotate);
-    InterpolationPlanar<Interpolation3DSurf>::setMedianPlane(medianPlane);
+    InterpolationPlanar<Interpolation3DSurf>::setDoRotate(doRotat);
+    InterpolationPlanar<Interpolation3DSurf>::setMedianPlane(medianPlan);
   }
 }
index d7aee3976130e27e024879c15a04425f36f87bb1..516e41c29378e2b9c293ed29f886ea2d1953da77 100644 (file)
@@ -512,7 +512,8 @@ namespace INTERP_KERNEL
                       //std::cout<<"coucou1" << std::endl;
                       if( _is_in_intersection)
                         {
-                          for(int idim=0;idim<DIM;idim++) _Inter.push_back(Poly1[DIM*i_loc+idim]);
+                          for(int iidim=0;iidim<DIM;iidim++)
+                            _Inter.push_back(Poly1[DIM*i_loc+iidim]);
                           _End_segments.push_back(std::make_pair(i_glob,i_next_glob));
                           _End_segments.push_back(std::make_pair(i_glob,i_prev_glob));
                         }
index f11b49b955a6db7fe1ce2a172783b7d539bb914e..5f5dd3a7efec148d5de7fc8aff4785955e4d96b1 100644 (file)
@@ -460,35 +460,35 @@ namespace INTERP_KERNEL
     Vect2 save;
     Vect2 edge0;
     Vect2 edge1;
-    for (int i = 0; i < 2; ++i)
+    for (int ii = 0; ii < 2; ++ii)
       {
-        edge0[i] = projTri0[1][i] - projTri0[0][i];
-        edge1[i] = projTri0[2][i] - projTri0[0][i];
+        edge0[ii] = projTri0[1][ii] - projTri0[0][ii];
+        edge1[ii] = projTri0[2][ii] - projTri0[0][ii];
       }
     if ((edge0[0] * edge1[1] - edge0[1] * edge1[0]) < (double) 0.)
       {
         // Triangle is clockwise, reorder it.
-        for (int i = 0; i < 2; ++i)
+        for (int ii = 0; ii < 2; ++ii)
           {
-            save[i] = projTri0[1][i];
-            projTri0[1][i] = projTri0[2][i];
-            projTri0[2][i] = save[i];
+            save[ii] = projTri0[1][ii];
+            projTri0[1][ii] = projTri0[2][ii];
+            projTri0[2][ii] = save[ii];
           }
       }
 
-    for (int i = 0; i < 2; ++i)
+    for (int ii = 0; ii < 2; ++ii)
       {
-        edge0[i] = projTri1[1][i] - projTri1[0][i];
-        edge1[i] = projTri1[2][i] - projTri1[0][i];
+        edge0[ii] = projTri1[1][ii] - projTri1[0][ii];
+        edge1[ii] = projTri1[2][ii] - projTri1[0][ii];
       }
     if ((edge0[0] * edge1[1] - edge0[1] * edge1[0]) < (double) 0.)
       {
         // Triangle is clockwise, reorder it.
-      for (int i = 0; i < 2; ++i)
+      for (int ii = 0; ii < 2; ++ii)
         {
-          save[i] = projTri1[1][i];
-          projTri1[1][i] = projTri1[2][i];
-          projTri1[2][i] = save[i];
+          save[ii] = projTri1[1][ii];
+          projTri1[1][ii] = projTri1[2][ii];
+          projTri1[2][ii] = save[ii];
         }
       }
 
index 849a2f6ab0e509c5fb91eb6a3258c3c0a8b94fa4..21dacb129b2b83c535dd6fecf80a98f94cb5536a 100644 (file)
@@ -255,8 +255,8 @@ namespace INTERP_KERNEL
       double barycenter[3];
       calculatePolygonBarycenter(A, barycenter);
       sortIntersectionPolygon(A, barycenter);
-      const int nbPoints = _polygonA.size();
-      for(int i = 0 ; i < nbPoints ; ++i)
+      const std::size_t nbPoints = _polygonA.size();
+      for(std::size_t i = 0 ; i < nbPoints ; ++i)
         tat->reverseApply(_polygonA[i], _polygonA[i]);
       _volume = calculateSurfacePolygon();
     }
@@ -585,11 +585,11 @@ namespace INTERP_KERNEL
      */
     double TransformedTriangle::calculateSurfacePolygon()
     {
-      const int nbPoints = _polygonA.size();
+      const std::size_t nbPoints = _polygonA.size();
       double pdt[3];
       double sum[3] = {0., 0., 0.};
 
-      for(int i = 0 ; i < nbPoints ; ++i)
+      for(std::size_t i = 0 ; i < nbPoints ; ++i)
         {
           const double *const ptCurr = _polygonA[i];  // pt "i"
           const double *const ptNext = _polygonA[(i + 1) % nbPoints]; // pt "i+1" (pt nbPoints == pt 0)
@@ -620,7 +620,7 @@ namespace INTERP_KERNEL
       std::vector<double*>& polygon = (poly == A) ? _polygonA : _polygonB;
 
       // calculate barycenter
-      const int m = polygon.size();
+      const std::size_t m = polygon.size();
 
       for(int j = 0 ; j < 3 ; ++j)
         {
@@ -629,7 +629,7 @@ namespace INTERP_KERNEL
 
       if(m != 0)
         {
-          for(int i = 0 ; i < m ; ++i)
+          for(std::size_t i = 0 ; i < m ; ++i)
             {
               const double* pt = polygon[i];
               for(int j = 0 ; j < 3 ; ++j)
@@ -719,9 +719,9 @@ namespace INTERP_KERNEL
       std::vector<double*>& polygon = (poly == A) ? _polygonA : _polygonB;
 
       double vol = 0.0;
-      const int m = polygon.size();
+      const std::size_t m = polygon.size();
 
-      for(int i = 0 ; i < m ; ++i)
+      for(std::size_t i = 0 ; i < m ; ++i)
         {
           const double* ptCurr = polygon[i];  // pt "i"
           const double* ptNext = polygon[(i + 1) % m]; // pt "i+1" (pt m == pt 0)
index faf7c9b618af28d165bbb07f93f88a422de05af8..02a43a4738ddb1a9c3c99b8d1136376191444275 100644 (file)
@@ -413,12 +413,7 @@ namespace INTERP_KERNEL
     // products 1 and 2 for each edge -> first condition in Grandy [30]
     // products 3 and 4 for each edge -> third condition
     // NB : some uncertainty whether these last are correct
-    static const DoubleProduct DP_FOR_HALFSTRIP_INTERSECTION[12] =
-      {
-        C_10, C_01, C_ZH, C_10, // XY
-        C_01, C_XY, C_XH, C_01, // YZ
-        C_XY, C_10, C_YH, C_XY  // ZX
-      };
+    // DP_FOR_HALFSTRIP_INTERSECTION
     
     // facets to use in second condition (S_m)
     static const TetraFacet FACET_FOR_HALFSTRIP_INTERSECTION[3] = 
index 03737720a442abe945de0c4a054ee809c541db15..49cc67e62535bf0aabeafe5c2ffd376b23be0c72 100644 (file)
@@ -228,7 +228,7 @@ namespace INTERP_KERNEL
     baryCenter[0] = baryCenter[1] = baryCenter[2] = 0.;
 
     std::list< std::vector< double* > >::iterator f = _faces.begin(), fEnd = _faces.end();
-    double * P = f->at(0);
+    double * PP = f->at(0);
 
     for ( ++f; f != fEnd; ++f )
       {
@@ -239,12 +239,12 @@ namespace INTERP_KERNEL
         bool pBelongsToPoly = false;
         std::vector<double*>::iterator v = polygon.begin(), vEnd = polygon.end();
         for ( ; !pBelongsToPoly && v != vEnd; ++v )
-          pBelongsToPoly = samePoint( P, *v );
+          pBelongsToPoly = samePoint( PP, *v );
         if ( pBelongsToPoly )
           continue;
 
         // Compute the barycenter of the volume. Barycenter of pyramid is on line
-        // ( barycenter of polygon -> P ) with 1/4 of pyramid height from polygon.
+        // ( barycenter of polygon -> PP ) with 1/4 of pyramid height from polygon.
 
         double bary[] = { 0, 0, 0 };
 
@@ -256,9 +256,9 @@ namespace INTERP_KERNEL
             bary[1] += p[1];
             bary[2] += p[2];
           }
-        bary[0] /= polygon.size();
-        bary[1] /= polygon.size();
-        bary[2] /= polygon.size();
+        bary[0] /= (int)polygon.size();
+        bary[1] /= (int)polygon.size();
+        bary[2] /= (int)polygon.size();
 
         // pyramid volume
         double vol = 0;
@@ -266,13 +266,13 @@ namespace INTERP_KERNEL
           {
             double* p1 = polygon[i];
             double* p2 = polygon[(i+1)%polygon.size()];
-            vol += std::fabs( calculateVolumeForTetra( p1, p2, bary, P ));
+            vol += std::fabs( calculateVolumeForTetra( p1, p2, bary, PP ));
           }
 
-        // put bary on the line ( barycenter of polygon -> P ) and multiply by volume
-        baryCenter[0] += ( bary[0] * 0.75 + P[0] * 0.25 ) * vol;
-        baryCenter[1] += ( bary[1] * 0.75 + P[1] * 0.25 ) * vol;
-        baryCenter[2] += ( bary[2] * 0.75 + P[2] * 0.25 ) * vol;
+        // put bary on the line ( barycenter of polygon -> PP ) and multiply by volume
+        baryCenter[0] += ( bary[0] * 0.75 + PP[0] * 0.25 ) * vol;
+        baryCenter[1] += ( bary[1] * 0.75 + PP[1] * 0.25 ) * vol;
+        baryCenter[2] += ( bary[2] * 0.75 + PP[2] * 0.25 ) * vol;
       }
     if ( _int_volume < 0. )
       _int_volume = -_int_volume;
@@ -328,7 +328,7 @@ namespace INTERP_KERNEL
           sideAdded[j] = ++nbAddedSides != 0 ;
       }
       if ( !sideAdded[3] &&
-           ( epsilonEqual( (coordSum[0]+coordSum[1]+coordSum[2]) / polygon.size(), 1. )))
+           ( epsilonEqual( (coordSum[0]+coordSum[1]+coordSum[2]) / (int)polygon.size(), 1. )))
         sideAdded[3] = ++nbAddedSides != 0 ;
     }
     if ( nbAddedSides == NB_TETRA_SIDES )
@@ -338,7 +338,7 @@ namespace INTERP_KERNEL
     // Add segments of already added polygons to future polygonal faces on sides of tetra
     // ---------------------------------------------------------------------------------
 
-    int nbIntersectPolygs = _faces.size();
+    std::size_t nbIntersectPolygs = _faces.size();
 
     std::vector< double* > * sideFaces[ 4 ]; // future polygons on sides of tetra
     for ( int i = 0; i < NB_TETRA_SIDES; ++i )
@@ -351,10 +351,10 @@ namespace INTERP_KERNEL
       }
     }
     f = _faces.begin(), fEnd = _faces.end();
-    for ( int iF = 0; iF < nbIntersectPolygs; ++f, ++iF ) // loop on added intersection polygons
+    for ( std::size_t iF = 0; iF < nbIntersectPolygs; ++f, ++iF ) // loop on added intersection polygons
     {
       std::vector< double* >& polygon = *f;
-      for ( int i = 0; i < (int)polygon.size(); ++i )
+      for ( std::size_t i = 0; i < polygon.size(); ++i )
       {
         // segment ends
         double* p1 = polygon[i];
@@ -428,7 +428,7 @@ namespace INTERP_KERNEL
     for ( int ic = 0; ic < NB_TETRA_NODES; ++ic )
     {
       f = _faces.begin(), fEnd = _faces.end();
-      for ( int iF = 0; iF < nbIntersectPolygs; ++f, ++iF ) // loop on added intersection polygons
+      for ( std::size_t iF = 0; iF < nbIntersectPolygs; ++f, ++iF ) // loop on added intersection polygons
       {
         std::vector< double* >& polygon = *f;
 
@@ -454,7 +454,7 @@ namespace INTERP_KERNEL
       if ( !sideFaces[i] ) continue;
       std::vector< double* >& sideFace = *sideFaces[i];
 
-      int nbPoints = sideFace.size();
+      std::size_t nbPoints = sideFace.size();
       if ( nbPoints == 0 )
         continue; // not intersected face at all - no cut off corners can be detected
 
@@ -462,9 +462,9 @@ namespace INTERP_KERNEL
 
       int nbCutOnSide = 0;
       bool isSegmentOnEdge=false;
-      for ( int ip = 0; ip < nbPoints; ++ip )
+      for ( std::size_t ip = 0; ip < nbPoints; ++ip )
       {
-        int isSegmentEnd = ( ip % 2 );
+        std::size_t isSegmentEnd = ( ip % 2 );
 
         double* p = sideFace[ ip ];
         double* p2 = isSegmentEnd ? 0 : sideFace[ip+1];
@@ -483,7 +483,7 @@ namespace INTERP_KERNEL
 
           if ( !isSegmentOnEdge )
           { // segment ends are on different edges
-            pCut[ind2] = isSegmentEnd; // believe that cutting triangles are well oriented
+            pCut[ind2] = (int)isSegmentEnd; // believe that cutting triangles are well oriented
             cutOffIndex = pCut[0] + 2*pCut[1] + 3*pCut[2];
           }
           if ( epsilonEqual( p[ind2], 0.) || epsilonEqual( p[ind2], 1.))
@@ -499,7 +499,7 @@ namespace INTERP_KERNEL
             isSegmentOnEdge = true;
           if ( !isSegmentEnd )
           {// segment ends are on different edges
-            pCut[ind1] = 1-isSegmentEnd;
+            pCut[ind1] = 1-(int)isSegmentEnd;
             cutOffIndex = pCut[0] + 2*pCut[1] + 3*pCut[2];
           }
           if ( epsilonEqual( p[ind1], 0.) || epsilonEqual( p[ind1], 1.))
@@ -515,8 +515,8 @@ namespace INTERP_KERNEL
             isSegmentOnEdge = true;
           if ( !isSegmentOnEdge )
           { //segment ends are on different edges
-            pCut[ind1] = isSegmentEnd;
-            pCut[ind2] = 1-isSegmentEnd;
+            pCut[ind1] = (int)isSegmentEnd;
+            pCut[ind2] = 1-(int)isSegmentEnd;
             cutOffIndex = pCut[0] + 2*pCut[1] + 3*pCut[2];
           }
         }
@@ -626,7 +626,7 @@ namespace INTERP_KERNEL
     // Sort corners of filled up faces on tetra sides and exclude equal points
     // ------------------------------------------------------------------------
 
-    int iF = 0;
+    std::size_t iF = 0;
     for ( f = _faces.begin(); f != fEnd; ++f, ++iF )
     {
       std::vector< double* >&  face = *f;
@@ -639,7 +639,7 @@ namespace INTERP_KERNEL
         if ( iF >= nbIntersectPolygs )
         { // sort points of side faces
           calculatePolygonBarycenter( A, _barycenterA );
-          setTriangleOnSide( iF - nbIntersectPolygs );
+          setTriangleOnSide( (int)(iF-nbIntersectPolygs) );
           sortIntersectionPolygon( A, _barycenterA );
         }
         // exclude equal points