Commit c71c0da0 authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

removed my unsigned-comparison warnings

parent 80399a40
#include "ProblemImplicit.h" #include "ProblemImplicit.h"
namespace AMDiS { namespace AMDiS {
void ProblemImplicitBase::readDofVec(std::istream& in, DOFVector<double>* vec, void ProblemImplicitBase::readDofVec(std::istream& in, DOFVector<double>* vec,
Mesh* mesh) Mesh* mesh)
...@@ -265,14 +265,14 @@ namespace AMDiS { ...@@ -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()) if ( m >= r.size() || im >= r[m].size())
return NULL; return NULL;
return (r[m])[im]; 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()) if (m >= phi1.size() || im >= phi1[m].size())
return NULL; return NULL;
...@@ -280,7 +280,7 @@ namespace AMDiS { ...@@ -280,7 +280,7 @@ namespace AMDiS {
return (phi1[m])[im]; 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()) if (m >= phi2.size() || im >= phi2[m].size())
return NULL; return NULL;
...@@ -288,7 +288,7 @@ namespace AMDiS { ...@@ -288,7 +288,7 @@ namespace AMDiS {
return (phi2[m])[im]; 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()) if (m >= levelSet.size() || im >= levelSet[m].size())
return NULL; return NULL;
...@@ -303,7 +303,7 @@ namespace AMDiS { ...@@ -303,7 +303,7 @@ namespace AMDiS {
phi1.resize(meshes.size()); phi1.resize(meshes.size());
phi2.resize(meshes.size()); phi2.resize(meshes.size());
levelSet.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); createImplicitMesh(i);
return true; return true;
} }
...@@ -375,7 +375,7 @@ namespace AMDiS { ...@@ -375,7 +375,7 @@ namespace AMDiS {
FUNCNAME("ProblemImplicitVec::createMesh()"); FUNCNAME("ProblemImplicitVec::createMesh()");
ProblemVec::createMesh(); ProblemVec::createMesh();
implMesh.resize(meshes.size()); 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[" + std::string path = name + "->implicit mesh[" +
boost::lexical_cast< std::string >(i) + "]"; boost::lexical_cast< std::string >(i) + "]";
......
...@@ -33,10 +33,10 @@ namespace AMDiS { ...@@ -33,10 +33,10 @@ namespace AMDiS {
virtual ~ProblemImplicitBase() {} virtual ~ProblemImplicitBase() {}
virtual bool createImplicitMesh() = 0; virtual bool createImplicitMesh() = 0;
virtual DOFVector<double>* getSignedDistance(int im = 0, int m = 0) = 0; virtual DOFVector<double>* getSignedDistance(unsigned int im = 0, unsigned int m = 0) = 0;
virtual DOFVector<double>* getPhi1(int im = 0, int m = 0) = 0; virtual DOFVector<double>* getPhi1(unsigned int im = 0, unsigned int m = 0) = 0;
virtual DOFVector<double>* getPhi2(int im = 0, int m = 0) = 0; virtual DOFVector<double>* getPhi2(unsigned int im = 0, unsigned int m = 0) = 0;
virtual DOFVector<double>* getLevelset(int im = 0, int m = 0) = 0; virtual DOFVector<double>* getLevelset(unsigned int im = 0, unsigned int m = 0) = 0;
protected: protected:
void readDofVec(std::istream& , DOFVector<double>* , Mesh*); void readDofVec(std::istream& , DOFVector<double>* , Mesh*);
...@@ -122,10 +122,10 @@ namespace AMDiS { ...@@ -122,10 +122,10 @@ namespace AMDiS {
virtual bool createImplicitMesh(); virtual bool createImplicitMesh();
virtual void initialize(Flag initFlag, ProblemScal* adoptProblem=NULL, virtual void initialize(Flag initFlag, ProblemScal* adoptProblem=NULL,
Flag adoptFlag = INIT_NOTHING); Flag adoptFlag = INIT_NOTHING);
DOFVector<double>* getSignedDistance(int im = 0, int m = 0) ; DOFVector<double>* getSignedDistance(unsigned int im = 0, unsigned int m = 0) ;
DOFVector<double>* getPhi1(int im = 0, int m = 0) ; DOFVector<double>* getPhi1(unsigned int im = 0, unsigned int m = 0) ;
DOFVector<double>* getPhi2(int im = 0, int m = 0) ; DOFVector<double>* getPhi2(unsigned int im = 0, unsigned int m = 0) ;
DOFVector<double>* getLevelset(int im = 0, int m = 0) ; DOFVector<double>* getLevelset(unsigned int im = 0, unsigned int m = 0) ;
protected: protected:
bool createImplicitMesh(int p); bool createImplicitMesh(int p);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment