From c71c0da0ba0f8469581c01217399f8ad28eca31b Mon Sep 17 00:00:00 2001 From: Andreas Naumann <andreas.naumann@tu-dresden.de> Date: Tue, 23 Nov 2010 07:37:27 +0000 Subject: [PATCH] removed my unsigned-comparison warnings --- AMDiS/src/ProblemImplicit.cc | 14 +++++++------- AMDiS/src/ProblemImplicit.h | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/AMDiS/src/ProblemImplicit.cc b/AMDiS/src/ProblemImplicit.cc index d2e4ee11..5defb9fe 100644 --- a/AMDiS/src/ProblemImplicit.cc +++ b/AMDiS/src/ProblemImplicit.cc @@ -1,5 +1,5 @@ #include "ProblemImplicit.h" - + namespace AMDiS { void ProblemImplicitBase::readDofVec(std::istream& in, DOFVector<double>* vec, Mesh* mesh) @@ -265,14 +265,14 @@ namespace AMDiS { } - DOFVector< double >* ProblemImplicitVec::getSignedDistance(int im , int m) + DOFVector< double >* ProblemImplicitVec::getSignedDistance(unsigned int im , unsigned int m) { if ( m >= r.size() || im >= r[m].size()) return NULL; return (r[m])[im]; } - DOFVector< double >* ProblemImplicitVec::getPhi1(int im, int m) + DOFVector< double >* ProblemImplicitVec::getPhi1(unsigned int im, unsigned int m) { if (m >= phi1.size() || im >= phi1[m].size()) return NULL; @@ -280,7 +280,7 @@ namespace AMDiS { return (phi1[m])[im]; } - DOFVector< double >* ProblemImplicitVec::getPhi2(int im, int m) + DOFVector< double >* ProblemImplicitVec::getPhi2(unsigned int im, unsigned int m) { if (m >= phi2.size() || im >= phi2[m].size()) return NULL; @@ -288,7 +288,7 @@ namespace AMDiS { return (phi2[m])[im]; } - DOFVector< double >* ProblemImplicitVec::getLevelset(int im, int m) + DOFVector< double >* ProblemImplicitVec::getLevelset(unsigned int im, unsigned int m) { if (m >= levelSet.size() || im >= levelSet[m].size()) return NULL; @@ -303,7 +303,7 @@ namespace AMDiS { phi1.resize(meshes.size()); phi2.resize(meshes.size()); levelSet.resize(meshes.size()); - for (int i = 0; i < meshes.size(); ++i) + for (unsigned int i = 0; i < meshes.size(); ++i) createImplicitMesh(i); return true; } @@ -375,7 +375,7 @@ namespace AMDiS { FUNCNAME("ProblemImplicitVec::createMesh()"); ProblemVec::createMesh(); implMesh.resize(meshes.size()); - for (int i = 0 ; i < meshes.size() ; ++i ) + for (unsigned int i = 0 ; i < meshes.size() ; ++i ) { std::string path = name + "->implicit mesh[" + boost::lexical_cast< std::string >(i) + "]"; diff --git a/AMDiS/src/ProblemImplicit.h b/AMDiS/src/ProblemImplicit.h index 7d98060f..49d1181b 100644 --- a/AMDiS/src/ProblemImplicit.h +++ b/AMDiS/src/ProblemImplicit.h @@ -33,10 +33,10 @@ namespace AMDiS { virtual ~ProblemImplicitBase() {} virtual bool createImplicitMesh() = 0; - virtual DOFVector<double>* getSignedDistance(int im = 0, int m = 0) = 0; - virtual DOFVector<double>* getPhi1(int im = 0, int m = 0) = 0; - virtual DOFVector<double>* getPhi2(int im = 0, int m = 0) = 0; - virtual DOFVector<double>* getLevelset(int im = 0, int m = 0) = 0; + virtual DOFVector<double>* getSignedDistance(unsigned int im = 0, unsigned int m = 0) = 0; + virtual DOFVector<double>* getPhi1(unsigned int im = 0, unsigned int m = 0) = 0; + virtual DOFVector<double>* getPhi2(unsigned int im = 0, unsigned int m = 0) = 0; + virtual DOFVector<double>* getLevelset(unsigned int im = 0, unsigned int m = 0) = 0; protected: void readDofVec(std::istream& , DOFVector<double>* , Mesh*); @@ -122,10 +122,10 @@ namespace AMDiS { virtual bool createImplicitMesh(); virtual void initialize(Flag initFlag, ProblemScal* adoptProblem=NULL, Flag adoptFlag = INIT_NOTHING); - DOFVector<double>* getSignedDistance(int im = 0, int m = 0) ; - DOFVector<double>* getPhi1(int im = 0, int m = 0) ; - DOFVector<double>* getPhi2(int im = 0, int m = 0) ; - DOFVector<double>* getLevelset(int im = 0, int m = 0) ; + DOFVector<double>* getSignedDistance(unsigned int im = 0, unsigned int m = 0) ; + DOFVector<double>* getPhi1(unsigned int im = 0, unsigned int m = 0) ; + DOFVector<double>* getPhi2(unsigned int im = 0, unsigned int m = 0) ; + DOFVector<double>* getLevelset(unsigned int im = 0, unsigned int m = 0) ; protected: bool createImplicitMesh(int p); -- GitLab