diff --git a/Geo/CGNSUtils.cpp b/Geo/CGNSUtils.cpp
index 8cd3b116e52af44584504e8d75adad35ad6af7b8..11c74e3db98ca167ae806753114e4d054cf4b840 100644
--- a/Geo/CGNSUtils.cpp
+++ b/Geo/CGNSUtils.cpp
@@ -175,8 +175,8 @@ template <unsigned DIM> int MZone<DIM>::zoneData()
       ++eVecIt) {
     // It is sufficient to check the primary vertices to see if this element
     // is on the boundary
-    const int nPVert = eVecIt->element->getNumPrimaryVertices();
-    for(int iPVert = 0; iPVert != nPVert; ++iPVert) {
+    const std::size_t nPVert = eVecIt->element->getNumPrimaryVertices();
+    for(std::size_t iPVert = 0; iPVert != nPVert; ++iPVert) {
       if(vertMap[eVecIt->element->getVertex(iPVert)] <= numBoVert) {
         // The element index
         eVecIt->index = cElem++;
@@ -185,8 +185,8 @@ template <unsigned DIM> int MZone<DIM>::zoneData()
         // Increment number of boundary elements of this type
         ++zoneElemConn[iElemType].numBoElem;
         // Load connectivity for this element type
-        const int nVert = eVecIt->element->getNumVertices();
-        for(int iVert = 0; iVert != nVert; ++iVert) {
+        const std::size_t nVert = eVecIt->element->getNumVertices();
+        for(std::size_t iVert = 0; iVert != nVert; ++iVert) {
           zoneElemConn[iElemType].add_to_connectivity(
             vertMap[eVecIt->element->getVertex(iVert)]);
         }
@@ -207,8 +207,8 @@ template <unsigned DIM> int MZone<DIM>::zoneData()
       // The type of element
       const int iElemType = eVecIt->element->getTypeForMSH() - 1;
       // Load connectivity for this element type
-      const int nVert = eVecIt->element->getNumVertices();
-      for(int iVert = 0; iVert != nVert; ++iVert) {
+      const std::size_t nVert = eVecIt->element->getNumVertices();
+      for(std::size_t iVert = 0; iVert != nVert; ++iVert) {
         zoneElemConn[iElemType].add_to_connectivity(
           vertMap[eVecIt->element->getVertex(iVert)]);
       }
@@ -268,8 +268,8 @@ template <unsigned DIM> struct ParseEntity {
           elemVec.push_back(ElemData(element[iElem]));
           ++zoneElemConn[(element[iElem])->getTypeForMSH() - 1].numElem;
           // Unique list of vertices
-          const int nVert = element[iElem]->getNumVertices();
-          for(int iVert = 0; iVert != nVert; ++iVert)
+          const std::size_t nVert = element[iElem]->getNumVertices();
+          for(std::size_t iVert = 0; iVert != nVert; ++iVert)
             vertMap[element[iElem]->getVertex(iVert)] = 0; // Unlabelled
           // Maintain list of (base element) faces with only one bounding
           // element.
diff --git a/Geo/Cell.cpp b/Geo/Cell.cpp
index e71355a11cecb325f72ce5fc88433c5fb09c2f3c..0257903528005ea8a60c3709dc6593a0f702f43e 100644
--- a/Geo/Cell.cpp
+++ b/Geo/Cell.cpp
@@ -51,7 +51,7 @@ std::pair<Cell *, bool> Cell::createCell(MElement *element, int domain)
   cell->_immune = false;
   cell->_num = 0;
 
-  for(int i = 0; i < element->getNumPrimaryVertices(); i++)
+  for(std::size_t i = 0; i < element->getNumPrimaryVertices(); i++)
     cell->_v.push_back(element->getVertex(i));
 
   return std::make_pair(cell, cell->_sortVertexIndices());
@@ -78,7 +78,7 @@ Cell::Cell(MElement *element, int domain)
   _immune = false;
   _num = 0;
 
-  for(int i = 0; i < element->getNumPrimaryVertices(); i++)
+  for(std::size_t i = 0; i < element->getNumPrimaryVertices(); i++)
     _v.push_back(element->getVertex(i));
 
   _sortVertexIndices();
diff --git a/Geo/Chain.cpp b/Geo/Chain.cpp
index d752fc00e3c8539956892c315a3a0c8666b9b5a7..1085e03de28d672bbfdb372bce3ac9b61bb8f6ba 100644
--- a/Geo/Chain.cpp
+++ b/Geo/Chain.cpp
@@ -83,7 +83,7 @@ bool ElemChain::_equalVertices(const std::vector<MVertex *> &v2) const
 ElemChain::ElemChain(MElement *e)
 {
   _dim = e->getDim();
-  for(int i = 0; i < e->getNumPrimaryVertices(); i++)
+  for(std::size_t i = 0; i < e->getNumPrimaryVertices(); i++)
     _v.push_back(e->getVertex(i));
   _sortVertexIndices();
 }
diff --git a/Geo/MEdge.cpp b/Geo/MEdge.cpp
index e83831d37e602b4dfe4cb053b1903a389dfb7d7e..ae936b20b22d94b351e3761f8ceeace599b6cda4 100644
--- a/Geo/MEdge.cpp
+++ b/Geo/MEdge.cpp
@@ -171,7 +171,7 @@ SPoint3 MEdgeN::pnt(double u) const
   fs->f(u, 0, 0, f);
 
   double x = 0, y = 0, z = 0;
-  for(int i = 0; i < fs->getNumShapeFunctions(); i++) {
+  for(std::size_t i = 0; i < fs->getNumShapeFunctions(); i++) {
     x += f[i] * _v[i]->x();
     y += f[i] * _v[i]->y();
     z += f[i] * _v[i]->z();
@@ -188,7 +188,7 @@ SVector3 MEdgeN::tangent(double u) const
   fs->df(u, 0, 0, sf);
 
   double dx = 0, dy = 0, dz = 0;
-  for(int i = 0; i < fs->getNumShapeFunctions(); i++) {
+  for(std::size_t i = 0; i < fs->getNumShapeFunctions(); i++) {
     dx += sf[i][0] * _v[i]->x();
     dy += sf[i][0] * _v[i]->y();
     dz += sf[i][0] * _v[i]->z();
@@ -205,7 +205,7 @@ double MEdgeN::interpolate(const double val[], double u, int stride) const
   fs->f(u, 0, 0, f);
 
   double sum = 0;
-  for(int i = 0, k = 0; i < fs->getNumShapeFunctions(); i++, k += stride) {
+  for(std::size_t i = 0, k = 0; i < fs->getNumShapeFunctions(); i++, k += stride) {
     sum += f[i] * val[k];
   }
   return sum;
diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index 6ed8b084de4af1debc6d6ad370a7b33b1d0788c0..158286385ed94943c4a9099587c74f59289a4356 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -186,11 +186,11 @@ MEdgeN MElement::getHighOrderEdge(int num, int sign)
   std::vector<MVertex *> vertices(static_cast<std::size_t>(order) + 1);
   vertices[0] = getVertex(numEdge2numVertex(num, sign > 0 ? 0 : 1));
   vertices[1] = getVertex(numEdge2numVertex(num, sign > 0 ? 1 : 0));
-  const int start = getNumPrimaryVertices() + num * (order - 1);
-  const int end = getNumPrimaryVertices() + (num + 1) * (order - 1);
+  const std::size_t start = getNumPrimaryVertices() + num * (order - 1);
+  const std::size_t end = getNumPrimaryVertices() + (num + 1) * (order - 1);
   int k = 1;
   if(sign > 0) {
-    for(int i = start; i < end; ++i) {
+    for(std::size_t i = start; i < end; ++i) {
       vertices[++k] = getVertex(i);
     }
   }
@@ -453,7 +453,7 @@ void MElement::signedInvCondNumRange(double &iCNMin, double &iCNMax,
     // If parametrized surface entity provided...
     SVector3 geoNorm(0., 0., 0.);
     // ... correct Jacobian sign with geometrical normal
-    for(int i = 0; i < getNumPrimaryVertices(); i++) {
+    for(std::size_t i = 0; i < getNumPrimaryVertices(); i++) {
       const MVertex *vert = getVertex(i);
       if(vert->onWhat() == ge) {
         double u, v;
@@ -567,8 +567,8 @@ SPoint3 MElement::barycenter_infty() const
 SPoint3 MElement::barycenter(bool primary) const
 {
   SPoint3 p(0., 0., 0.);
-  int n = primary ? getNumPrimaryVertices() : getNumVertices();
-  for(int i = 0; i < n; i++) {
+  std::size_t n = primary ? getNumPrimaryVertices() : getNumVertices();
+  for(std::size_t i = 0; i < n; i++) {
     const MVertex *v = getVertex(i);
     p[0] += v->x();
     p[1] += v->y();
@@ -583,8 +583,8 @@ SPoint3 MElement::barycenter(bool primary) const
 SPoint3 MElement::fastBarycenter(bool primary) const
 {
   SPoint3 p(0., 0., 0.);
-  int n = primary ? getNumPrimaryVertices() : getNumVertices();
-  for(int i = 0; i < n; i++) {
+  std::size_t n = primary ? getNumPrimaryVertices() : getNumVertices();
+  for(std::size_t i = 0; i < n; i++) {
     const MVertex *v = getVertex(i);
     p[0] += v->x();
     p[1] += v->y();
@@ -900,7 +900,7 @@ double MElement::getJacobian(double u, double v, double w,
 
   double gsf[1256][3];
   getGradShapeFunctions(u, v, w, gsf);
-  for(int i = 0; i < getNumShapeFunctions(); i++) {
+  for(std::size_t i = 0; i < getNumShapeFunctions(); i++) {
     const MVertex *ver = getShapeFunctionNode(i);
     double *gg = gsf[i];
     for(int j = 0; j < getDim(); j++) {
@@ -921,8 +921,8 @@ double MElement::getJacobian(const fullMatrix<double> &gsf,
   jac[2][0] = jac[2][1] = jac[2][2] = 0.;
   if(gsf.size2() > 3) return 0;
 
-  const int numShapeFunctions = getNumShapeFunctions();
-  for(int i = 0; i < numShapeFunctions; i++) {
+  const std::size_t numShapeFunctions = getNumShapeFunctions();
+  for(std::size_t i = 0; i < numShapeFunctions; i++) {
     const MVertex *v = getShapeFunctionNode(i);
     for(int j = 0; j < gsf.size2(); j++) {
       jac[j][0] += v->x() * gsf(i, j);
@@ -982,10 +982,10 @@ double MElement::getPrimaryJacobian(double u, double v, double w,
 
   double gsf[1256][3];
   getGradShapeFunctions(u, v, w, gsf, 1);
-  for(int i = 0; i < getNumPrimaryShapeFunctions(); i++) {
+  for(std::size_t i = 0; i < getNumPrimaryShapeFunctions(); i++) {
     const MVertex *v = getShapeFunctionNode(i);
     double *gg = gsf[i];
-    for(int j = 0; j < 3; j++) {
+    for(std::size_t j = 0; j < 3; j++) {
       jac[j][0] += v->x() * gg[j];
       jac[j][1] += v->y() * gg[j];
       jac[j][2] += v->z() * gg[j];
@@ -1069,7 +1069,7 @@ void MElement::pnt(double u, double v, double w, SPoint3 &p) const
   double x = 0., y = 0., z = 0.;
   double sf[1256];
   getShapeFunctions(u, v, w, sf);
-  for(int j = 0; j < getNumShapeFunctions(); j++) {
+  for(std::size_t j = 0; j < getNumShapeFunctions(); j++) {
     const MVertex *v = getShapeFunctionNode(j);
     x += sf[j] * v->x();
     y += sf[j] * v->y();
@@ -1083,7 +1083,7 @@ void MElement::pnt(double u, double v, double w, double *p) const
   double x = 0., y = 0., z = 0.;
   double sf[1256];
   getShapeFunctions(u, v, w, sf);
-  for(int j = 0; j < getNumShapeFunctions(); j++) {
+  for(std::size_t j = 0; j < getNumShapeFunctions(); j++) {
     const MVertex *v = getShapeFunctionNode(j);
     x += sf[j] * v->x();
     y += sf[j] * v->y();
@@ -1097,7 +1097,7 @@ void MElement::pnt(double u, double v, double w, double *p) const
 void MElement::pnt(const std::vector<double> &sf, SPoint3 &p) const
 {
   double x = 0., y = 0., z = 0.;
-  for(int j = 0; j < getNumShapeFunctions(); j++) {
+  for(std::size_t j = 0; j < getNumShapeFunctions(); j++) {
     const MVertex *v = getShapeFunctionNode(j);
     x += sf[j] * v->x();
     y += sf[j] * v->y();
@@ -1111,7 +1111,7 @@ void MElement::primaryPnt(double u, double v, double w, SPoint3 &p)
   double x = 0., y = 0., z = 0.;
   double sf[1256];
   getShapeFunctions(u, v, w, sf, 1);
-  for(int j = 0; j < getNumPrimaryShapeFunctions(); j++) {
+  for(std::size_t j = 0; j < getNumPrimaryShapeFunctions(); j++) {
     const MVertex *v = getShapeFunctionNode(j);
     x += sf[j] * v->x();
     y += sf[j] * v->y();
@@ -1134,7 +1134,7 @@ void MElement::xyz2uvw(double xyz[3], double uvw[3]) const
     double distNearer = (v->x() - xyz[0]) * (v->x() - xyz[0]) +
                         (v->y() - xyz[1]) * (v->y() - xyz[1]) +
                         (v->z() - xyz[2]) * (v->z() - xyz[2]);
-    for(int i = 1; i < getNumShapeFunctions(); i++) {
+    for(std::size_t i = 1; i < getNumShapeFunctions(); i++) {
       const MVertex *v = getShapeFunctionNode(i);
       double dist = (v->x() - xyz[0]) * (v->x() - xyz[0]) +
                     (v->y() - xyz[1]) * (v->y() - xyz[1]) +
@@ -1160,7 +1160,7 @@ void MElement::xyz2uvw(double xyz[3], double uvw[3]) const
     double xn = 0., yn = 0., zn = 0.;
     double sf[1256];
     getShapeFunctions(uvw[0], uvw[1], uvw[2], sf);
-    for(int i = 0; i < getNumShapeFunctions(); i++) {
+    for(std::size_t i = 0; i < getNumShapeFunctions(); i++) {
       const MVertex *v = getShapeFunctionNode(i);
       xn += v->x() * sf[i];
       yn += v->y() * sf[i];
@@ -1217,7 +1217,7 @@ double MElement::interpolate(double val[], double u, double v, double w,
   int j = 0;
   double sf[1256];
   getShapeFunctions(u, v, w, sf, order);
-  for(int i = 0; i < getNumShapeFunctions(); i++) {
+  for(std::size_t i = 0; i < getNumShapeFunctions(); i++) {
     sum += val[j] * sf[i];
     j += stride;
   }
@@ -1232,7 +1232,7 @@ void MElement::interpolateGrad(double val[], double u, double v, double w,
   int j = 0;
   double gsf[1256][3];
   getGradShapeFunctions(u, v, w, gsf, order);
-  for(int i = 0; i < getNumShapeFunctions(); i++) {
+  for(std::size_t i = 0; i < getNumShapeFunctions(); i++) {
     dfdu[0] += val[j] * gsf[i][0];
     dfdu[1] += val[j] * gsf[i][1];
     dfdu[2] += val[j] * gsf[i][2];
diff --git a/Geo/MElementCut.cpp b/Geo/MElementCut.cpp
index 9f9062b0ec6b7cea02eae3410b85ab739da0023c..6217451b43b42c441f1b0104eb0ea515c440ef1b 100644
--- a/Geo/MElementCut.cpp
+++ b/Geo/MElementCut.cpp
@@ -1040,7 +1040,7 @@ static void elementCutMesh(
           it != itr.second; it++) {
         MElement *tb = it->second;
         int match = 0;
-        for(int i = 0; i < p1->getNumPrimaryVertices(); i++) {
+        for(std::size_t i = 0; i < p1->getNumPrimaryVertices(); i++) {
           if(tb->getVertex(0) == p1->getVertex(i) ||
              tb->getVertex(1) == p1->getVertex(i) ||
              tb->getVertex(2) == p1->getVertex(i))
@@ -1297,7 +1297,7 @@ static void elementCutMesh(
           it != itr.second; ++it) {
         MElement *lb = it->second;
         int match = 0;
-        for(int i = 0; i < p1->getNumPrimaryVertices(); i++) {
+        for(std::size_t i = 0; i < p1->getNumPrimaryVertices(); i++) {
           if(lb->getVertex(0) == p1->getVertex(i) ||
              lb->getVertex(1) == p1->getVertex(i))
             match++;
diff --git a/Geo/MFace.cpp b/Geo/MFace.cpp
index cdd1db8b129278a10bd9483d7b288374f4375f1c..1565efecccd08d5af2233dc3d516a5f613689d9f 100644
--- a/Geo/MFace.cpp
+++ b/Geo/MFace.cpp
@@ -271,7 +271,7 @@ SPoint3 MFaceN::pnt(double u, double v) const
   fs->f(u, v, 0, f);
 
   double x = 0, y = 0, z = 0;
-  for(int j = 0; j < fs->getNumShapeFunctions(); j++) {
+  for(std::size_t j = 0; j < fs->getNumShapeFunctions(); j++) {
     x += f[j] * _v[j]->x();
     y += f[j] * _v[j]->y();
     z += f[j] * _v[j]->z();
@@ -290,7 +290,7 @@ SVector3 MFaceN::tangent(double u, double v, int num) const
   fs->df(u, v, 0, sf);
 
   double dx = 0, dy = 0, dz = 0;
-  for(int j = 0; j < fs->getNumShapeFunctions(); j++) {
+  for(std::size_t j = 0; j < fs->getNumShapeFunctions(); j++) {
     dx += sf[j][num] * _v[j]->x();
     dy += sf[j][num] * _v[j]->y();
     dz += sf[j][num] * _v[j]->z();
@@ -307,7 +307,7 @@ SVector3 MFaceN::normal(double u, double v) const
   fs->df(u, v, 0, sf);
 
   double dx[2] = {0, 0}, dy[2] = {0, 0}, dz[2] = {0, 0};
-  for(int j = 0; j < fs->getNumShapeFunctions(); j++) {
+  for(std::size_t j = 0; j < fs->getNumShapeFunctions(); j++) {
     for(int k = 0; k < 1; ++k) {
       dx[k] += sf[j][k] * _v[j]->x();
       dy[k] += sf[j][k] * _v[j]->y();
@@ -331,7 +331,7 @@ void MFaceN::frame(double u, double v, SVector3 &t0, SVector3 &t1,
   fs->df(u, v, 0, sf);
 
   double dx[2] = {0, 0}, dy[2] = {0, 0}, dz[2] = {0, 0};
-  for(int j = 0; j < fs->getNumShapeFunctions(); j++) {
+  for(std::size_t j = 0; j < fs->getNumShapeFunctions(); j++) {
     for(int k = 0; k < 2; ++k) {
       dx[k] += sf[j][k] * _v[j]->x();
       dy[k] += sf[j][k] * _v[j]->y();
@@ -357,7 +357,7 @@ void MFaceN::frame(double u, double v, SPoint3 &p, SVector3 &t0, SVector3 &t1,
 
   double x = 0, y = 0, z = 0;
   double dx[2] = {0, 0}, dy[2] = {0, 0}, dz[2] = {0, 0};
-  for(int j = 0; j < fs->getNumShapeFunctions(); j++) {
+  for(std::size_t j = 0; j < fs->getNumShapeFunctions(); j++) {
     x += f[j] * _v[j]->x();
     y += f[j] * _v[j]->y();
     z += f[j] * _v[j]->z();
diff --git a/Mesh/HighOrder.cpp b/Mesh/HighOrder.cpp
index bbbce4a651c88b691421ccb2a2d59ca1edecde12..b43b3f4fcbbfbb9013c235f5b355b13e0388f158 100644
--- a/Mesh/HighOrder.cpp
+++ b/Mesh/HighOrder.cpp
@@ -760,7 +760,7 @@ static void getFaceVertices(GFace *gf, MElement *ele,
 
   std::vector<MVertex *> boundaryVertices;
   {
-    int nCorner = ele->getNumPrimaryVertices();
+    std::size_t nCorner = ele->getNumPrimaryVertices();
     boundaryVertices.reserve(nCorner + newVertices.size());
     ele->getVertices(boundaryVertices);
     boundaryVertices.resize(nCorner);
@@ -902,7 +902,7 @@ static void getVolumeVertices(GRegion *gr, MElement *ele,
 {
   std::vector<MVertex *> boundaryVertices;
   {
-    int nCorner = ele->getNumPrimaryVertices();
+    std::size_t nCorner = ele->getNumPrimaryVertices();
     boundaryVertices.reserve(nCorner + newVertices.size());
     ele->getVertices(boundaryVertices);
     boundaryVertices.resize(nCorner);
@@ -1213,10 +1213,10 @@ static void setFirstOrder(GEntity *e, std::vector<T *> &elements,
   std::vector<T *> elements1;
   for(std::size_t i = 0; i < elements.size(); i++) {
     T *ele = elements[i];
-    int n = ele->getNumPrimaryVertices();
+    std::size_t n = ele->getNumPrimaryVertices();
     std::vector<MVertex *> v1;
     v1.reserve(n);
-    for(int j = 0; j < n; j++) v1.push_back(ele->getVertex(j));
+    for(std::size_t j = 0; j < n; j++) v1.push_back(ele->getVertex(j));
     elements1.push_back(new T(v1, 0, ele->getPartition()));
     delete ele;
   }
diff --git a/Mesh/meshPartition.cpp b/Mesh/meshPartition.cpp
index f1d41f6ee2ca98db53c9ac50fbb5d53571646595..630f55d0394b2a967c646e76a9499599ee0254c3 100644
--- a/Mesh/meshPartition.cpp
+++ b/Mesh/meshPartition.cpp
@@ -466,10 +466,10 @@ static void fillElementsToNodesMap(Graph &graph, const GEntity *const entity,
                                    ITERATOR it_end)
 {
   for(ITERATOR it = it_beg; it != it_end; ++it) {
-    const int numVertices = (*it)->getNumPrimaryVertices();
+    const std::size_t numVertices = (*it)->getNumPrimaryVertices();
     graph.element(eptrIndex++, *it);
     graph.eptr(eptrIndex, graph.eptr(eptrIndex - 1) + numVertices);
-    for(int i = 0; i < numVertices; i++) {
+    for(std::size_t i = 0; i < numVertices; i++) {
       if(graph.vertex((*it)->getVertex(i)->getNum() - 1) == -1) {
         graph.vertex((*it)->getVertex(i)->getNum() - 1, numVertex++);
       }
@@ -2053,7 +2053,7 @@ static void CreatePartitionTopology(
       for(unsigned int i = 0; i < model->getNumPartitions(); i++) {
         for(std::set<MElement *>::iterator it = boundaryElements[i].begin();
             it != boundaryElements[i].end(); ++it) {
-          for(int j = 0; j < (*it)->getNumPrimaryVertices(); j++) {
+          for(std::size_t j = 0; j < (*it)->getNumPrimaryVertices(); j++) {
             vertexToElement[(*it)->getVertex(j)].push_back(
               std::pair<MElement *, std::vector<unsigned int> >(
                 *it, std::vector<unsigned int>(1, i + 1)));
@@ -2093,7 +2093,7 @@ static void CreatePartitionTopology(
       for(unsigned int i = 0; i < mapOfPartitionsTag; i++) {
         for(std::set<MElement *>::iterator it = subBoundaryElements[i].begin();
             it != subBoundaryElements[i].end(); ++it) {
-          for(int j = 0; j < (*it)->getNumPrimaryVertices(); j++) {
+          for(std::size_t j = 0; j < (*it)->getNumPrimaryVertices(); j++) {
             vertexToElement[(*it)->getVertex(j)].push_back(
               std::pair<MElement *, std::vector<unsigned int> >(
                 *it, mapOfPartitions[i]));
diff --git a/Mesh/meshRefine.cpp b/Mesh/meshRefine.cpp
index 08bdad2ecf7a08438c1e35d041c953f3d0b84e59..82ff44068c784546030dd7aefe3ce3843d8b0db3 100644
--- a/Mesh/meshRefine.cpp
+++ b/Mesh/meshRefine.cpp
@@ -58,7 +58,7 @@ static void setBLData(MVertex *v)
 static bool setBLData(MElement *el)
 {
   // Check whether all low-order nodes are marked as BL nodes (only works in 2D)
-  for(int i = 0; i < el->getNumPrimaryVertices(); i++) {
+  for(std::size_t i = 0; i < el->getNumPrimaryVertices(); i++) {
     MVertex *v = el->getVertex(i);
     bool isBL = false;
     switch(v->onWhat()->dim()) {
diff --git a/Mesh/qualityMeasures.cpp b/Mesh/qualityMeasures.cpp
index 4c0af3af91bf4655184317a7cb7be78d38f7cca2..559ead710aad3dc79a7811a78e7c31fb2ce0cd5a 100644
--- a/Mesh/qualityMeasures.cpp
+++ b/Mesh/qualityMeasures.cpp
@@ -220,7 +220,7 @@ double qmTriangle::angles(MTriangle *e)
   double tmp[3][3];
 
   // double minAngle = 120.0;
-  for(int i = 0; i < e->getNumPrimaryVertices(); i++) {
+  for(std::size_t i = 0; i < e->getNumPrimaryVertices(); i++) {
     const double u = i == 1 ? 1 : 0;
     const double v = i == 2 ? 1 : 0;
     const double w = 0;
diff --git a/Plugin/Crack.cpp b/Plugin/Crack.cpp
index e1125889f54de5b328ed329a6bad96abbb543839..e4a20d732662f7bd2e99182cd3a2733c6242eb58 100644
--- a/Plugin/Crack.cpp
+++ b/Plugin/Crack.cpp
@@ -123,7 +123,7 @@ PView *GMSH_CrackPlugin::execute(PView *view)
         MVertex *v = crackElements[i]->getVertex(j);
         crackVertices.insert(v);
       }
-      for(int j = 0; j < crackElements[i]->getNumPrimaryVertices(); j++) {
+      for(std::size_t j = 0; j < crackElements[i]->getNumPrimaryVertices(); j++) {
         MVertex *v = crackElements[i]->getVertex(j);
         if(bndVertices.find(v) == bndVertices.end())
           bndVertices.insert(v);
diff --git a/Plugin/Distance.cpp b/Plugin/Distance.cpp
index 50f2d17b2bfc5bbe84fd7a96a2c8d432727f665d..1ea641a8ca6a119d0039f36092283c1b82c4a898 100644
--- a/Plugin/Distance.cpp
+++ b/Plugin/Distance.cpp
@@ -86,7 +86,7 @@ void GMSH_DistancePlugin::printView(std::vector<GEntity *> &entities,
     if(entities[ii]->dim() == _maxDim) {
       for(std::size_t i = 0; i < entities[ii]->getNumMeshElements(); i++) {
         MElement *e = entities[ii]->getMeshElement(i);
-        int numNodes = e->getNumPrimaryVertices();
+        std::size_t numNodes = e->getNumPrimaryVertices();
         if(e->getNumChildren())
           numNodes = e->getNumChildren() * e->getChild(0)->getNumVertices();
         std::vector<double> x(numNodes), y(numNodes), z(numNodes);
@@ -94,7 +94,7 @@ void GMSH_DistancePlugin::printView(std::vector<GEntity *> &entities,
         std::vector<MVertex *> nods;
 
         if(!e->getNumChildren())
-          for(int i = 0; i < numNodes; i++) nods.push_back(e->getVertex(i));
+          for(std::size_t i = 0; i < numNodes; i++) nods.push_back(e->getVertex(i));
         else
           for(int i = 0; i < e->getNumChildren(); i++)
             for(std::size_t j = 0; j < e->getChild(i)->getNumVertices(); j++)
diff --git a/Post/PViewDataGModel.cpp b/Post/PViewDataGModel.cpp
index c94985eaa0885b09268ea6be35cc8adebc299406..53633be86a0b8c70afe2758742d8cc2665695f37 100644
--- a/Post/PViewDataGModel.cpp
+++ b/Post/PViewDataGModel.cpp
@@ -526,7 +526,7 @@ int PViewDataGModel::getNumNodes(int step, int ent, int ele)
     if(e->getNumChildren())
       return e->getNumChildren() * e->getChild(0)->getNumVertices();
     if(getAdaptiveData()) return e->getNumVertices();
-    return e->getNumPrimaryVertices();
+    return (int)e->getNumPrimaryVertices();
   }
 }
 
@@ -557,7 +557,7 @@ int PViewDataGModel::getNode(int step, int ent, int ele, int nod, double &x,
     }
     else {
       double vx[8], vy[8], vz[8];
-      for(int i = 0; i < e->getNumPrimaryVertices(); i++) {
+      for(std::size_t i = 0; i < e->getNumPrimaryVertices(); i++) {
         vx[i] = e->getVertex(i)->x();
         vy[i] = e->getVertex(i)->y();
         vz[i] = e->getVertex(i)->z();
diff --git a/Solver/FuncGradDisc.h b/Solver/FuncGradDisc.h
index 53bddc49d4e00e0d775b3a59e44c265dcba92196..e06d3647fbb7ed433d881066dfc18193d73907db 100644
--- a/Solver/FuncGradDisc.h
+++ b/Solver/FuncGradDisc.h
@@ -41,7 +41,7 @@ public:
     double val[30];
     e->getShapeFunctions(uvw[0], uvw[1], uvw[2], val);
     double f = 0;
-    for(int i = 0; i < e->getNumShapeFunctions(); i++) {
+    for(std::size_t i = 0; i < e->getNumShapeFunctions(); i++) {
       MVertex *v = e->getShapeFunctionNode(i);
       // std::cout<<"val[i] :" << val[i] << "\n";
       // std::cout<<"ls(i) :" << (*_ls)(v->x(),v->y(),v->z()) << "\n";
@@ -62,7 +62,7 @@ public:
     //        double val[30];
     //        e->getShapeFunctions(uvw[0], uvw[1], uvw[2], val);
     //        double f = 0;
-    //        for (int i = 0; i < e->getNumShapeFunctions(); i++)
+    //        for (std::size_t i = 0; i < e->getNumShapeFunctions(); i++)
     //        {
     //           MVertex *v = e-<getShapeFunctionNode(i);
     //           f = f + (*_ls)(v->x(), v->y(), v->z()) * val[i];
@@ -97,7 +97,7 @@ public:
     dfdz = 0;
 
     if((*_ls)(x, y, z) > 0) {
-      for(int i = 0; i < e->getNumShapeFunctions(); i++) {
+      for(std::size_t i = 0; i < e->getNumShapeFunctions(); i++) {
         dNdx = invjac[0][0] * gradsuvw[i][0] + invjac[0][1] * gradsuvw[i][1] +
                invjac[0][2] * gradsuvw[i][2];
         dNdy = invjac[1][0] * gradsuvw[i][0] + invjac[1][1] * gradsuvw[i][1] +
@@ -115,7 +115,7 @@ public:
       }
     }
     else {
-      for(int i = 0; i < e->getNumShapeFunctions(); i++) {
+      for(std::size_t i = 0; i < e->getNumShapeFunctions(); i++) {
         dNdx = invjac[0][0] * gradsuvw[i][0] + invjac[0][1] * gradsuvw[i][1] +
                invjac[0][2] * gradsuvw[i][2];
         dNdy = invjac[1][0] * gradsuvw[i][0] + invjac[1][1] * gradsuvw[i][1] +
@@ -159,7 +159,7 @@ public:
   //
   //        if ((*_ls)(x,y,z)>0)
   //        {
-  //          for (int i = 0; i < e->getNumShapeFunctions(); i++)
+  //          for (std::size_t i = 0; i < e->getNumShapeFunctions(); i++)
   //          {
   //            dNdx = invjac[0][0] * gradsuvw[i][0] + invjac[0][1] *
   //            gradsuvw[i][1] + invjac[0][2] * gradsuvw[i][2]; dNdy =
@@ -175,7 +175,7 @@ public:
   //          }
   //        }else
   //        {
-  //          for (int i = 0; i < e->getNumShapeFunctions(); i++)
+  //          for (std::size_t i = 0; i < e->getNumShapeFunctions(); i++)
   //          {
   //            dNdx = invjac[0][0] * gradsuvw[i][0] + invjac[0][1] *
   //            gradsuvw[i][1] + invjac[0][2] * gradsuvw[i][2]; dNdy =
diff --git a/Solver/distanceTerm.h b/Solver/distanceTerm.h
index a0ffb252ffe0dbd17af2fb8a5ce4aae76e22406e..5ebb49a202a41bf8b1a545b7898f4edee40f7f2f 100644
--- a/Solver/distanceTerm.h
+++ b/Solver/distanceTerm.h
@@ -32,7 +32,7 @@ public:
       const double weight = GP[i].weight;
       const double detJ = e->getJacobian(u, v, w, jac);
       e->getShapeFunctions(u, v, w, ff);
-      for(int j = 0; j < e->getNumShapeFunctions(); j++) {
+      for(std::size_t j = 0; j < e->getNumShapeFunctions(); j++) {
         m(j) += ff[j] * weight * detJ;
       }
     }
diff --git a/Solver/elasticityTerm.cpp b/Solver/elasticityTerm.cpp
index 09cfa8dc7aa6f7f69fbdc9da38890f832d3d0c67..63e4f05bf815583daad448e417308760fe8bce35 100644
--- a/Solver/elasticityTerm.cpp
+++ b/Solver/elasticityTerm.cpp
@@ -13,7 +13,7 @@ void elasticityTerm::createData(MElement *e) const
 {
   if(_data.find(e->getTypeForMSH()) != _data.end()) return;
   elasticityDataAtGaussPoint d;
-  int nbSF = e->getNumShapeFunctions();
+  int nbSF = (int)e->getNumShapeFunctions();
   int integrationOrder = 2 * (e->getPolynomialOrder() - 1);
   int npts;
   IntPt *GP;
@@ -45,7 +45,7 @@ void elasticityTerm::elementMatrix(SElement *se, fullMatrix<double> &m) const
   MElement *e = se->getMeshElement();
   createData(e);
 
-  int nbSF = e->getNumShapeFunctions();
+  int nbSF = (int)e->getNumShapeFunctions();
   elasticityDataAtGaussPoint &d = _data[e->getTypeForMSH()];
   int npts = d.u.size();
   m.setAll(0.);
@@ -127,7 +127,7 @@ void elasticityTerm::elementMatrix(SElement *se, fullMatrix<double> &m) const
 void elasticityTerm::elementVector(SElement *se, fullVector<double> &m) const
 {
   MElement *e = se->getMeshElement();
-  int nbSF = e->getNumShapeFunctions();
+  int nbSF = (int)e->getNumShapeFunctions();
   int integrationOrder = 2 * e->getPolynomialOrder();
   int npts;
   IntPt *GP;
diff --git a/Solver/elasticityTerm.h b/Solver/elasticityTerm.h
index 58be1cc433f152f78f72627351618904606c079f..f05689fd90600bdd12d7c33c0b06f31d2e527294 100644
--- a/Solver/elasticityTerm.h
+++ b/Solver/elasticityTerm.h
@@ -43,16 +43,16 @@ public:
   Dof getLocalDofR(SElement *se, int iRow) const
   {
     MElement *e = se->getMeshElement();
-    int iCompR = iRow / e->getNumShapeFunctions();
-    int ithLocalVertex = iRow % e->getNumShapeFunctions();
+    int iCompR = iRow / (int)e->getNumShapeFunctions();
+    int ithLocalVertex = iRow % (int)e->getNumShapeFunctions();
     return Dof(e->getShapeFunctionNode(ithLocalVertex)->getNum(),
                Dof::createTypeWithTwoInts(iCompR, _iFieldR));
   }
   Dof getLocalDofC(SElement *se, int iCol) const
   {
     MElement *e = se->getMeshElement();
-    int iCompC = iCol / e->getNumShapeFunctions();
-    int ithLocalVertex = iCol % e->getNumShapeFunctions();
+    int iCompC = iCol / (int)e->getNumShapeFunctions();
+    int ithLocalVertex = iCol % (int)e->getNumShapeFunctions();
     return Dof(e->getShapeFunctionNode(ithLocalVertex)->getNum(),
                Dof::createTypeWithTwoInts(iCompC, _iFieldC));
   }