From 7e5b73ef7df8b5afa4b99a4acd1cab6fa757d72b Mon Sep 17 00:00:00 2001 From: Anthony Royer <anthony.royer@uliege.be> Date: Thu, 28 Jun 2018 11:20:49 +0200 Subject: [PATCH] 'numCommonNodesInDualGraph' and warnings --- Geo/MElement.h | 2 +- Geo/MElementCut.h | 4 ++-- Geo/MHexahedron.cpp | 2 +- Geo/MHexahedron.h | 2 +- Geo/MLine.h | 2 +- Geo/MPoint.h | 2 +- Geo/MPrism.cpp | 2 +- Geo/MPrism.h | 2 +- Geo/MPyramid.cpp | 2 +- Geo/MPyramid.h | 2 +- Geo/MQuadrangle.cpp | 2 +- Geo/MQuadrangle.h | 2 +- Geo/MTetrahedron.cpp | 2 +- Geo/MTetrahedron.h | 2 +- Geo/MTriangle.cpp | 2 +- Geo/MTriangle.h | 2 +- Geo/MTrihedron.cpp | 2 +- Geo/MTrihedron.h | 2 +- Mesh/meshPartition.cpp | 4 ++-- 19 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Geo/MElement.h b/Geo/MElement.h index 42453aa53b..3398db6092 100644 --- a/Geo/MElement.h +++ b/Geo/MElement.h @@ -485,7 +485,7 @@ public: // Return the number of nodes that this element must have with the other in // order to put an edge between them in the dual graph used during the // partitioning. - virtual int numCommonNodesInDualGraph(const MElement *const other) const = 0; + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const = 0; }; class MElementFactory { diff --git a/Geo/MElementCut.h b/Geo/MElementCut.h index af41bc2f05..68b6574385 100644 --- a/Geo/MElementCut.h +++ b/Geo/MElementCut.h @@ -176,7 +176,7 @@ class MPolyhedron : public MElement { for(int j = 0; j < 4; j++) verts[i * 4 + j] = _parts[i]->getVertex(j)->getIndex(); } - virtual int numCommonNodesInDualGraph(const MElement *const other) const + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const { return 1; } @@ -325,7 +325,7 @@ class MPolygon : public MElement { for(int j = 0; j < 3; j++) verts[i * 3 + j] = _parts[i]->getVertex(j)->getIndex(); } - virtual int numCommonNodesInDualGraph(const MElement *const other) const + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const { return 1; } diff --git a/Geo/MHexahedron.cpp b/Geo/MHexahedron.cpp index f3859b099e..98d7b8f2fc 100644 --- a/Geo/MHexahedron.cpp +++ b/Geo/MHexahedron.cpp @@ -94,7 +94,7 @@ bool MHexahedron::getFaceInfo(const MFace &face, int &ithFace, int &sign, int &r return false; } -int MHexahedron::numCommonNodesInDualGraph(const MElement *const other) const +unsigned int MHexahedron::numCommonNodesInDualGraph(const MElement *const other) const { switch (other->getType()) { diff --git a/Geo/MHexahedron.h b/Geo/MHexahedron.h index bdf17719da..ba48774f2c 100644 --- a/Geo/MHexahedron.h +++ b/Geo/MHexahedron.h @@ -185,7 +185,7 @@ class MHexahedron : public MElement { }; return e[face][edge]; } - virtual int numCommonNodesInDualGraph(const MElement *const other) const; + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const; }; /* diff --git a/Geo/MLine.h b/Geo/MLine.h index 6a7ea1f918..b3d6edd5b3 100644 --- a/Geo/MLine.h +++ b/Geo/MLine.h @@ -97,7 +97,7 @@ class MLine : public MElement { } virtual void getIntegrationPoints(int pOrder, int *npts, IntPt **pts); virtual void discretize(double tol, std::vector<SPoint3> &dpts, std::vector<double> &ts); - virtual int numCommonNodesInDualGraph(const MElement *const other) const + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const { return ((other->getType() == TYPE_LIN || other->getType() == TYPE_PNT) ? 1 : 2); } diff --git a/Geo/MPoint.h b/Geo/MPoint.h index 8be73fedd5..d359e84373 100644 --- a/Geo/MPoint.h +++ b/Geo/MPoint.h @@ -82,7 +82,7 @@ class MPoint : public MElement { *npts = 1; *pts = GQL; } - virtual int numCommonNodesInDualGraph(const MElement *const other) const + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const { return 1; } diff --git a/Geo/MPrism.cpp b/Geo/MPrism.cpp index db02237ca6..6f3199caba 100644 --- a/Geo/MPrism.cpp +++ b/Geo/MPrism.cpp @@ -77,7 +77,7 @@ bool MPrism::getFaceInfo(const MFace &face, int &ithFace, int &sign, int &rot) c return false; } -int MPrism::numCommonNodesInDualGraph(const MElement *const other) const +unsigned int MPrism::numCommonNodesInDualGraph(const MElement *const other) const { switch (other->getType()) { diff --git a/Geo/MPrism.h b/Geo/MPrism.h index a5cf14e600..df4f03a1db 100644 --- a/Geo/MPrism.h +++ b/Geo/MPrism.h @@ -196,7 +196,7 @@ class MPrism : public MElement { }; return f[face][edge]; } - virtual int numCommonNodesInDualGraph(const MElement *const other) const; + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const; }; /* diff --git a/Geo/MPyramid.cpp b/Geo/MPyramid.cpp index 6781ddca13..7f90bf1507 100644 --- a/Geo/MPyramid.cpp +++ b/Geo/MPyramid.cpp @@ -370,7 +370,7 @@ void MPyramid::getFaceRep(bool curved, int num, x, y, z, n); } -int MPyramid::numCommonNodesInDualGraph(const MElement *const other) const +unsigned int MPyramid::numCommonNodesInDualGraph(const MElement *const other) const { switch (other->getType()) { case TYPE_PNT: return 1; diff --git a/Geo/MPyramid.h b/Geo/MPyramid.h index 8c58eb7345..7f2653a79a 100644 --- a/Geo/MPyramid.h +++ b/Geo/MPyramid.h @@ -182,7 +182,7 @@ class MPyramid : public MElement { }; return e[face][edge]; } - virtual int numCommonNodesInDualGraph(const MElement *const other) const; + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const; }; /* diff --git a/Geo/MQuadrangle.cpp b/Geo/MQuadrangle.cpp index 13133829f8..c7ca69635f 100644 --- a/Geo/MQuadrangle.cpp +++ b/Geo/MQuadrangle.cpp @@ -69,7 +69,7 @@ double MQuadrangle::getVolume() return sqrt( mn*mn - abcd*abcd ) / 4.; } -int MQuadrangle::numCommonNodesInDualGraph(const MElement *const other) const +unsigned int MQuadrangle::numCommonNodesInDualGraph(const MElement *const other) const { switch (other->getType()) { diff --git a/Geo/MQuadrangle.h b/Geo/MQuadrangle.h index 3d87c3875f..6547e9f672 100644 --- a/Geo/MQuadrangle.h +++ b/Geo/MQuadrangle.h @@ -150,7 +150,7 @@ class MQuadrangle : public MElement { }; return e[edge][vert]; } - virtual int numCommonNodesInDualGraph(const MElement *const other) const; + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const; }; /* diff --git a/Geo/MTetrahedron.cpp b/Geo/MTetrahedron.cpp index ec9f1c81d9..c82e2743ac 100644 --- a/Geo/MTetrahedron.cpp +++ b/Geo/MTetrahedron.cpp @@ -124,7 +124,7 @@ void MTetrahedron::xyz2uvw(double xyz[3], double uvw[3]) const sys3x3(mat, b, uvw, &det); } -int MTetrahedron::numCommonNodesInDualGraph(const MElement *const other) const +unsigned int MTetrahedron::numCommonNodesInDualGraph(const MElement *const other) const { switch (other->getType()) { diff --git a/Geo/MTetrahedron.h b/Geo/MTetrahedron.h index 2536cc88f5..14b25ac803 100644 --- a/Geo/MTetrahedron.h +++ b/Geo/MTetrahedron.h @@ -186,7 +186,7 @@ class MTetrahedron : public MElement { }; return e[face][edge]; } - virtual int numCommonNodesInDualGraph(const MElement *const other) const; + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const; }; /* diff --git a/Geo/MTriangle.cpp b/Geo/MTriangle.cpp index bdef6f1bd0..f2cd566905 100644 --- a/Geo/MTriangle.cpp +++ b/Geo/MTriangle.cpp @@ -157,7 +157,7 @@ void MTriangle::xyz2uvw(double xyz[3], double uvw[3]) const uvw[2] = 0.0; } -int MTriangle::numCommonNodesInDualGraph(const MElement *const other) const +unsigned int MTriangle::numCommonNodesInDualGraph(const MElement *const other) const { switch (other->getType()) { diff --git a/Geo/MTriangle.h b/Geo/MTriangle.h index a040a5a26e..fe6acbb3a3 100644 --- a/Geo/MTriangle.h +++ b/Geo/MTriangle.h @@ -152,7 +152,7 @@ class MTriangle : public MElement { }; return e[edge][vert]; } - virtual int numCommonNodesInDualGraph(const MElement *const other) const; + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const; }; /* diff --git a/Geo/MTrihedron.cpp b/Geo/MTrihedron.cpp index d08ca23042..0d046a58f0 100644 --- a/Geo/MTrihedron.cpp +++ b/Geo/MTrihedron.cpp @@ -1,7 +1,7 @@ #include "GmshConfig.h" #include "MTrihedron.h" -int MTrihedron::numCommonNodesInDualGraph(const MElement *const other) const +unsigned int MTrihedron::numCommonNodesInDualGraph(const MElement *const other) const { switch (other->getType()) { case TYPE_PNT: return 1; diff --git a/Geo/MTrihedron.h b/Geo/MTrihedron.h index 936699a2ec..9894de80c6 100644 --- a/Geo/MTrihedron.h +++ b/Geo/MTrihedron.h @@ -159,7 +159,7 @@ class MTrihedron : public MElement { } // Return the number of nodes that this element must have with the other in order to put an edge between them in the dual graph used during the partitioning. - virtual int numCommonNodesInDualGraph(const MElement *const other) const; + virtual unsigned int numCommonNodesInDualGraph(const MElement *const other) const; }; #endif diff --git a/Mesh/meshPartition.cpp b/Mesh/meshPartition.cpp index 3d01c4465a..c186b7daa1 100644 --- a/Mesh/meshPartition.cpp +++ b/Mesh/meshPartition.cpp @@ -295,7 +295,7 @@ class Graph unsigned int l = 0; for(unsigned int j = _eptr[i]; j < _eptr[i+1]; ++j){ for(unsigned int k = nptr[_eind[j]]; k < nptr[_eind[j]+1]; ++k){ - if(nind[k] != (int)i){ + if(nind[k] != i){ if(marker[nind[k]] == 0) nbrs[l++] = nind[k]; marker[nind[k]]++; } @@ -325,7 +325,7 @@ class Graph unsigned int l = 0; for(unsigned int j = _eptr[i]; j < _eptr[i+1]; ++j){ for(unsigned int k = nptr[_eind[j]]; k < nptr[_eind[j]+1]; ++k){ - if(nind[k] != (int)i){ + if(nind[k] != i){ if (marker[nind[k]] == 0) nbrs[l++] = nind[k]; marker[nind[k]]++; } -- GitLab