Skip to content
Snippets Groups Projects
Commit 278c7cfc authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix warnings

parent 7978834f
Branches
Tags
No related merge requests found
// $Id: GModel.cpp,v 1.83 2008-04-13 09:45:48 geuzaine Exp $ // $Id: GModel.cpp,v 1.84 2008-04-15 19:02:32 geuzaine Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -72,7 +72,7 @@ GModel *GModel::current(int index) ...@@ -72,7 +72,7 @@ GModel *GModel::current(int index)
if(index >= 0) _current = index; if(index >= 0) _current = index;
if(list.empty()) return 0; // not an error if(list.empty()) return 0; // not an error
if(_current < 0 || _current >= list.size()) return list.back(); if(_current < 0 || _current >= (int)list.size()) return list.back();
return list[_current]; return list[_current];
} }
......
// $Id: GModelIO_MED.cpp,v 1.28 2008-04-13 20:52:07 geuzaine Exp $ // $Id: GModelIO_MED.cpp,v 1.29 2008-04-15 19:02:32 geuzaine Exp $
// //
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
// //
...@@ -166,7 +166,7 @@ int GModel::readMED(const std::string &name) ...@@ -166,7 +166,7 @@ int GModel::readMED(const std::string &name)
return 0; return 0;
} }
int ret; int ret = 1;
// FIXME change all this once we clarify Open/Merge/Clear // FIXME change all this once we clarify Open/Merge/Clear
MVertex::resetGlobalNumber(); MVertex::resetGlobalNumber();
MElement::resetGlobalNumber(); MElement::resetGlobalNumber();
......
// $Id: meshGFace.cpp,v 1.129 2008-03-26 09:37:49 remacle Exp $ // $Id: meshGFace.cpp,v 1.130 2008-04-15 19:02:32 geuzaine Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -467,7 +467,6 @@ bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, bool debug = true) ...@@ -467,7 +467,6 @@ bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, bool debug = true)
for(int i = 0; i < doc.numPoints; i++){ for(int i = 0; i < doc.numPoints; i++){
MVertex *here = (MVertex *)doc.points[i].data; MVertex *here = (MVertex *)doc.points[i].data;
int num = here->getNum(); int num = here->getNum();
GEntity *ge = here->onWhat();
double U, V; double U, V;
if(num < 0){ // fake bbox points if(num < 0){ // fake bbox points
U = bb[-1 - num]->x(); U = bb[-1 - num]->x();
...@@ -477,18 +476,7 @@ bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, bool debug = true) ...@@ -477,18 +476,7 @@ bool gmsh2DMeshGenerator(GFace *gf, int RECUR_ITER, bool debug = true)
U = U_[num]; U = U_[num];
V = V_[num]; V = V_[num];
} }
BDS_Point *pp = m->add_point(num, U, V, gf); m->add_point(num, U, V, gf);
// if(ge->dim() == 0){
// pp->lcBGM() = BGM_MeshSize(ge, 0, 0, here->x(), here->y(), here->z());
// }
// else if(ge->dim() == 1){
// double u;
// here->getParameter(0,u);
// pp->lcBGM() = BGM_MeshSize(ge, u, 0, here->x(), here->y(), here->z());
// }
// else
// pp->lcBGM() = 1.e22;
// pp->lc() = pp->lcBGM();
} }
......
// $Id: meshGFaceDelaunayInsertion.cpp,v 1.23 2008-03-30 18:39:32 remacle Exp $ // $Id: meshGFaceDelaunayInsertion.cpp,v 1.24 2008-04-15 19:02:32 geuzaine Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -631,7 +631,7 @@ void gmshBowyerWatson(GFace *gf) ...@@ -631,7 +631,7 @@ void gmshBowyerWatson(GFace *gf)
if(ITER++ % 5000 == 0) if(ITER++ % 5000 == 0)
Msg(DEBUG1,"%7d points created -- Worst tri radius is %8.3f", Msg(DEBUG1,"%7d points created -- Worst tri radius is %8.3f",
vSizes.size(), worst->getRadius()); vSizes.size(), worst->getRadius());
double center[2],uv[2],metric[3],r2; double center[2],metric[3],r2;
if (worst->getRadius() < 0.5 * sqrt(2.0)) break; if (worst->getRadius() < 0.5 * sqrt(2.0)) break;
circUV(worst->tri(), Us, Vs, center, gf); circUV(worst->tri(), Us, Vs, center, gf);
MTriangle *base = worst->tri(); MTriangle *base = worst->tri();
...@@ -730,7 +730,7 @@ void gmshBowyerWatsonFrontal(GFace *gf){ ...@@ -730,7 +730,7 @@ void gmshBowyerWatsonFrontal(GFace *gf){
vSizes.size(), worst->getRadius()); vSizes.size(), worst->getRadius());
// compute circum center of that guy // compute circum center of that guy
double center[2],uv[2],metric[3],r2; double center[2],metric[3],r2;
MTriangle *base = worst->tri(); MTriangle *base = worst->tri();
circUV(base, Us, Vs, center, gf); circUV(base, Us, Vs, center, gf);
double pa[2] = {(Us[base->getVertex(0)->getNum()] + double pa[2] = {(Us[base->getVertex(0)->getNum()] +
...@@ -773,7 +773,7 @@ void gmshBowyerWatsonFrontal(GFace *gf){ ...@@ -773,7 +773,7 @@ void gmshBowyerWatsonFrontal(GFace *gf){
const double rhoM = Extend1dMeshIn2dSurfaces() ? std::min(rhoM1, rhoM2) : rhoM2; const double rhoM = Extend1dMeshIn2dSurfaces() ? std::min(rhoM1, rhoM2) : rhoM2;
double ps = dir[0]*(P[0]-Q[0]) + dir[1]*(P[1]-Q[1]) ; //double ps = dir[0]*(P[0]-Q[0]) + dir[1]*(P[1]-Q[1]) ;
// printf("ratio = %12.5E dir %g %g m %g %g %g %g ps = %12.5E\n",RATIO,dir[0],dir[1],metric[0],metric[1],metric[2],rhoM*sqrt(3.),ps); // printf("ratio = %12.5E dir %g %g m %g %g %g %g ps = %12.5E\n",RATIO,dir[0],dir[1],metric[0],metric[1],metric[2],rhoM*sqrt(3.),ps);
// const double rhoM_hat = std::max(rhoM,2*p); // const double rhoM_hat = std::max(rhoM,2*p);
...@@ -831,7 +831,7 @@ void gmshBowyerWatsonFrontal2(GFace *gf){ ...@@ -831,7 +831,7 @@ void gmshBowyerWatsonFrontal2(GFace *gf){
Msg(DEBUG1,"%7d points created -- Worst tri radius is %8.3f", Msg(DEBUG1,"%7d points created -- Worst tri radius is %8.3f",
vSizes.size(), worst->getRadius()); vSizes.size(), worst->getRadius());
// compute circum center of that guy // compute circum center of that guy
double center[2],uv[2],metric[3],r2; double center[2],metric[3],r2;
MTriangle *base = worst->tri(); MTriangle *base = worst->tri();
circUV(base, Us, Vs, center, gf); circUV(base, Us, Vs, center, gf);
double pa[2] = {(Us[base->getVertex(0)->getNum()] + double pa[2] = {(Us[base->getVertex(0)->getNum()] +
......
// $Id: Levelset.cpp,v 1.44 2008-04-05 09:21:37 geuzaine Exp $ // $Id: Levelset.cpp,v 1.45 2008-04-15 19:02:32 geuzaine Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -71,7 +71,7 @@ static void getSimplexDec(int numNodes, int numEdges, int i, ...@@ -71,7 +71,7 @@ static void getSimplexDec(int numNodes, int numEdges, int i,
n0 = pri[i][0]; n1 = pri[i][1]; n2 = pri[i][2]; n3 = pri[i][3]; nn = 4; ne = 6; n0 = pri[i][0]; n1 = pri[i][1]; n2 = pri[i][2]; n3 = pri[i][3]; nn = 4; ne = 6;
break; break;
case 8: case 8:
n0 = pri[i][0]; n1 = pri[i][1]; n2 = pri[i][2]; n3 = pri[i][3]; nn = 4; ne = 6; n0 = pyr[i][0]; n1 = pyr[i][1]; n2 = pyr[i][2]; n3 = pyr[i][3]; nn = 4; ne = 6;
break; break;
default: default:
n0 = 0; n1 = 1; n2 = 2; n3 = 3; nn = numNodes; ne = numEdges; n0 = 0; n1 = 1; n2 = 2; n3 = 3; nn = numNodes; ne = numEdges;
......
...@@ -119,7 +119,7 @@ class stepData{ ...@@ -119,7 +119,7 @@ class stepData{
} }
std::vector<double> &getGaussPoints(int msh) std::vector<double> &getGaussPoints(int msh)
{ {
if(_gaussPoints.size() <= msh) _gaussPoints.resize(msh + 1); if((int)_gaussPoints.size() <= msh) _gaussPoints.resize(msh + 1);
return _gaussPoints[msh]; return _gaussPoints[msh];
} }
}; };
......
// $Id: PViewDataGModelIO.cpp,v 1.40 2008-04-06 09:20:17 geuzaine Exp $ // $Id: PViewDataGModelIO.cpp,v 1.41 2008-04-15 19:02:33 geuzaine Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -212,8 +212,8 @@ bool PViewDataGModel::readMED(std::string fileName, int fileIndex) ...@@ -212,8 +212,8 @@ bool PViewDataGModel::readMED(std::string fileName, int fileIndex)
med_int numSteps = 0; med_int numSteps = 0;
std::vector<std::pair<int, int> > pairs; std::vector<std::pair<int, int> > pairs;
for(int i = 0; i < sizeof(entType) / sizeof(entType[0]); i++){ for(unsigned int i = 0; i < sizeof(entType) / sizeof(entType[0]); i++){
for(int j = 0; j < sizeof(eleType) / sizeof(eleType[0]); j++){ for(unsigned int j = 0; j < sizeof(eleType) / sizeof(eleType[0]); j++){
med_int n = MEDnPasdetemps(fid, name, entType[i], eleType[j]); med_int n = MEDnPasdetemps(fid, name, entType[i], eleType[j]);
if(n > 0){ if(n > 0){
pairs.push_back(std::pair<int, int>(i, j)); pairs.push_back(std::pair<int, int>(i, j));
...@@ -307,7 +307,7 @@ bool PViewDataGModel::readMED(std::string fileName, int fileIndex) ...@@ -307,7 +307,7 @@ bool PViewDataGModel::readMED(std::string fileName, int fileIndex)
} }
// we should check that refcoo corresponds to our internal // we should check that refcoo corresponds to our internal
// reference element // reference element
for(unsigned int i = 0; i < gscoo.size(); i++){ for(int i = 0; i < (int)gscoo.size(); i++){
p.push_back(gscoo[i]); p.push_back(gscoo[i]);
if(i % dim == dim - 1) for(int j = 0; j < 3 - dim; j++) p.push_back(0.); if(i % dim == dim - 1) for(int j = 0; j < 3 - dim; j++) p.push_back(0.);
} }
...@@ -362,7 +362,7 @@ bool PViewDataGModel::readMED(std::string fileName, int fileIndex) ...@@ -362,7 +362,7 @@ bool PViewDataGModel::readMED(std::string fileName, int fileIndex)
num = startIndex + profile[i]; num = startIndex + profile[i];
} }
else{ else{
if(profile[i] == 0 || profile[i] > tags.size()){ if(profile[i] == 0 || profile[i] > (int)tags.size()){
Msg(GERROR, "Wrong index in profile"); Msg(GERROR, "Wrong index in profile");
return false; return false;
} }
......
// $Id: PViewDataList.cpp,v 1.21 2008-04-06 09:20:17 geuzaine Exp $ // $Id: PViewDataList.cpp,v 1.22 2008-04-15 19:02:33 geuzaine Exp $
// //
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
// //
...@@ -453,11 +453,11 @@ void PViewDataList::revertElement(int step, int ent, int ele) ...@@ -453,11 +453,11 @@ void PViewDataList::revertElement(int step, int ent, int ele)
// copy data // copy data
std::vector<double> XYZ(3 * _lastNumNodes); std::vector<double> XYZ(3 * _lastNumNodes);
for(int i = 0; i < XYZ.size(); i++) for(unsigned int i = 0; i < XYZ.size(); i++)
XYZ[i] = _lastXYZ[i]; XYZ[i] = _lastXYZ[i];
std::vector<double> V(_lastNumNodes * _lastNumComponents * getNumTimeSteps()); std::vector<double> V(_lastNumNodes * _lastNumComponents * getNumTimeSteps());
for(int i = 0; i < V.size(); i++) for(unsigned int i = 0; i < V.size(); i++)
V[i] = _lastVal[i]; V[i] = _lastVal[i];
// reverse node order // reverse node order
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment