From ece8af40a0a1678c2045e2b7993d4aad7fd658bd Mon Sep 17 00:00:00 2001 From: Christoph Grueninger <christoph.grueninger@iws.uni-stuttgart.de> Date: Tue, 22 Jan 2013 12:28:49 +0000 Subject: [PATCH] [Implicit] Fix sign/unsign comparison warnings. git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10063 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/implicit/common/implicitlocaljacobian.hh | 4 ++-- dumux/implicit/common/implicitlocalresidual.hh | 2 +- dumux/implicit/common/implicitmodel.hh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dumux/implicit/common/implicitlocaljacobian.hh b/dumux/implicit/common/implicitlocaljacobian.hh index 8a21d9cc36..6feec0db06 100644 --- a/dumux/implicit/common/implicitlocaljacobian.hh +++ b/dumux/implicit/common/implicitlocaljacobian.hh @@ -349,9 +349,9 @@ protected: */ void reset_() { - for (int i = 0; i < A_.N(); ++ i) { + for (unsigned int i = 0; i < A_.N(); ++ i) { storageJacobian_[i] = 0.0; - for (int j = 0; j < A_.M(); ++ j) { + for (unsigned int j = 0; j < A_.M(); ++ j) { A_[i][j] = 0.0; } } diff --git a/dumux/implicit/common/implicitlocalresidual.hh b/dumux/implicit/common/implicitlocalresidual.hh index 3651153588..07461ce3d2 100644 --- a/dumux/implicit/common/implicitlocalresidual.hh +++ b/dumux/implicit/common/implicitlocalresidual.hh @@ -213,7 +213,7 @@ public: Valgrind::CheckDefined(curVolVars); #if !defined NDEBUG && HAVE_VALGRIND - for (int i = 0; i < prevVolVars.size(); i++) { + for (unsigned int i = 0; i < prevVolVars.size(); i++) { prevVolVars[i].checkDefined(); curVolVars[i].checkDefined(); } diff --git a/dumux/implicit/common/implicitmodel.hh b/dumux/implicit/common/implicitmodel.hh index 1bb905fa78..417783256b 100644 --- a/dumux/implicit/common/implicitmodel.hh +++ b/dumux/implicit/common/implicitmodel.hh @@ -686,7 +686,7 @@ public: def[eqIdx] = writer.allocateManagedBuffer(numDofs); } - for (int globalIdx = 0; globalIdx < u.size(); globalIdx++) + for (unsigned int globalIdx = 0; globalIdx < u.size(); globalIdx++) { for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) { @@ -933,7 +933,7 @@ protected: if (isBox) { // divide all primary variables by the volume of their boxes - for (int i = 0; i < uCur_.size(); ++i) { + for (unsigned int i = 0; i < uCur_.size(); ++i) { uCur_[i] /= boxVolume(i); } } -- GitLab