Commit b41bfd46 authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

Get rid of some compare-signed warnings.

(thoroughly reviewed by Philipp")


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@8137 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent ab32c62d
......@@ -215,7 +215,7 @@ public:
}
// reset all vertex colors to green
for (int i = 0; i < vertexColor_.size(); ++i) {
for (unsigned int i = 0; i < vertexColor_.size(); ++i) {
vertexColor_[i] = Green;
}
}
......@@ -287,7 +287,7 @@ public:
// update the vector with the distances of the current
// evaluation point used for linearization from the original
// evaluation point
for (int i = 0; i < vertexDelta_.size(); ++i) {
for (unsigned int i = 0; i < vertexDelta_.size(); ++i) {
PrimaryVariables uCurrent(u[i]);
PrimaryVariables uNext(uCurrent);
uNext -= uDelta[i];
......@@ -349,7 +349,7 @@ public:
// mark the red vertices and update the tolerance of the
// linearization which actually will get achieved
nextReassembleAccuracy_ = 0;
for (int i = 0; i < vertexColor_.size(); ++i) {
for (unsigned int i = 0; i < vertexColor_.size(); ++i) {
if (vertexDelta_[i] > relTol)
// mark vertex as red if discrepancy is larger than
// the relative tolerance
......@@ -461,7 +461,7 @@ public:
Dune::ForwardCommunication);
// promote the remaining orange vertices to red
for (int i=0; i < vertexColor_.size(); ++i) {
for (unsigned int i=0; i < vertexColor_.size(); ++i) {
// if a vertex is green or yellow don't do anything!
if (vertexColor_[i] == Green || vertexColor_[i] == Yellow)
continue;
......@@ -643,7 +643,7 @@ private:
}
// reset all entries corrosponding to a red or yellow vertex
for (int rowIdx = 0; rowIdx < matrix_->N(); ++rowIdx) {
for (unsigned int rowIdx = 0; rowIdx < matrix_->N(); ++rowIdx) {
if (vertexColor_[rowIdx] == Green)
continue; // the equations for this control volume are
// already below the treshold
......
......@@ -195,7 +195,7 @@ public:
if (!enableHints_)
return;
for (int i = 0; i < elemVolVars.size(); ++i) {
for (unsigned int i = 0; i < elemVolVars.size(); ++i) {
int globalIdx = vertexMapper().map(element, i, dim);
curHints_[globalIdx] = elemVolVars[i];
if (!hintsUsable_[globalIdx])
......
......@@ -125,7 +125,7 @@ void findUnusedKeys_(std::list<std::string> &unusedParams,
// loop over all keys of the current tree
const Dune::ParameterTree::KeyVector &keys =
tree.getValueKeys();
for (int i = 0; i < keys.size(); ++i) {
for (unsigned int i = 0; i < keys.size(); ++i) {
std::string canonicalName = prefix + keys[i];
// check whether the key was accessed
......@@ -137,7 +137,7 @@ void findUnusedKeys_(std::list<std::string> &unusedParams,
// loop over all subtrees
const Dune::ParameterTree::KeyVector &subKeys =
tree.getSubKeys();
for (int i = 0; i < subKeys.size(); ++i) {
for (unsigned int i = 0; i < subKeys.size(); ++i) {
std::string newPrefix = prefix + subKeys[i] + ".";
findUnusedKeys_<TypeTag>(unusedParams,
......
......@@ -113,7 +113,7 @@ std::string readOptions_(int argc, char **argv, Dune::ParameterTree &paramTree)
}
// parse argument
int j = 0;
unsigned int j = 0;
while (true) {
if (j >= s.size()) {
// encountered the end of the string, i.e. we
......
......@@ -233,7 +233,7 @@ public:
{
std::string dummy;
std::getline(inStream_, dummy);
for (int i = 0; i < dummy.length(); ++i) {
for (unsigned int i = 0; i < dummy.length(); ++i) {
if (!std::isspace(dummy[i])) {
DUNE_THROW(Dune::InvalidStateException,
"Encountered unread values while deserializing");
......
......@@ -417,7 +417,7 @@ private:
template <class DataBuffer>
void sanitizeBuffer_(DataBuffer &b, int nComps)
{
for (int i = 0; i < b.size(); ++i) {
for (unsigned int i = 0; i < b.size(); ++i) {
for (int j = 0; j < nComps; ++j) {
Valgrind::CheckDefined(b[i][j]);
......
......@@ -469,7 +469,7 @@ public:
lineSearchUpdate_(uCurrentIter, uLastIter, deltaU);
}
else {
for (int i = 0; i < uLastIter.size(); ++i) {
for (unsigned int i = 0; i < uLastIter.size(); ++i) {
uCurrentIter[i] = uLastIter[i];
uCurrentIter[i] -= deltaU[i];
}
......
Supports Markdown
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