diff --git a/dumux/boxmodels/common/boxassembler.hh b/dumux/boxmodels/common/boxassembler.hh index 7d8905bc3ff0272fd8ba61a3f61f1a340b6f42f8..b7d746fb6e39222f33cc8c56c0175a19cd463d81 100644 --- a/dumux/boxmodels/common/boxassembler.hh +++ b/dumux/boxmodels/common/boxassembler.hh @@ -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 diff --git a/dumux/boxmodels/common/boxmodel.hh b/dumux/boxmodels/common/boxmodel.hh index d7c0c6c16fac725a0b62a3696ef20affb5a125fb..eed078531618c63230f921a1bcafbd7f10dcc66e 100644 --- a/dumux/boxmodels/common/boxmodel.hh +++ b/dumux/boxmodels/common/boxmodel.hh @@ -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]) diff --git a/dumux/common/parameters.hh b/dumux/common/parameters.hh index 1c4768268f63144398a488a0c5d0ad9c9cf26dd8..ae807cafdc98da0901ee5b6d492edb3b38dc5726 100644 --- a/dumux/common/parameters.hh +++ b/dumux/common/parameters.hh @@ -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, diff --git a/dumux/common/start.hh b/dumux/common/start.hh index d1de8fcac7a55f64eaab213793ce1f27f59efc61..1a708815fe467e402afb37fa885a8a0298376ca4 100644 --- a/dumux/common/start.hh +++ b/dumux/common/start.hh @@ -113,7 +113,7 @@ std::string readOptions_(int argc, char **argv, Dune::ParameterTree ¶mTree) } // parse argument - int j = 0; + unsigned int j = 0; while (true) { if (j >= s.size()) { // encountered the end of the string, i.e. we diff --git a/dumux/io/restart.hh b/dumux/io/restart.hh index 05e0446a80c42f620797e27bc104d0445c76fc89..087b84e166a7735abdbae77aacafbb927cb9b3c1 100644 --- a/dumux/io/restart.hh +++ b/dumux/io/restart.hh @@ -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"); diff --git a/dumux/io/vtkmultiwriter.hh b/dumux/io/vtkmultiwriter.hh index 8c805050db10fc124ad8b05d00f732d29a9a80f6..a89143596018fdb98446a8eac6b5b74c3d106ba3 100644 --- a/dumux/io/vtkmultiwriter.hh +++ b/dumux/io/vtkmultiwriter.hh @@ -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]); diff --git a/dumux/nonlinear/newtoncontroller.hh b/dumux/nonlinear/newtoncontroller.hh index 5108d09d159f81d0ffd629d772527dadae2e47c0..18f860631e202ebf9f6a11301a085d36ed6a6e52 100644 --- a/dumux/nonlinear/newtoncontroller.hh +++ b/dumux/nonlinear/newtoncontroller.hh @@ -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]; }