From 8c2aa6056b72affdff8f699d70311d053fe8826e Mon Sep 17 00:00:00 2001 From: Christoph Grueninger <christoph.grueninger@iws.uni-stuttgart.de> Date: Tue, 30 Apr 2013 08:10:10 +0000 Subject: [PATCH] Fix some for loop variables to prevent sign-compare warnings. (reviewed by fetzer) git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10589 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/decoupled/2p2c/2p2cproblem.hh | 2 +- dumux/implicit/3p3c/3p3cmodel.hh | 4 ++-- dumux/implicit/cellcentered/ccassembler.hh | 2 +- dumux/implicit/common/implicitassembler.hh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dumux/decoupled/2p2c/2p2cproblem.hh b/dumux/decoupled/2p2c/2p2cproblem.hh index d2f1e430f1..f88409ac4f 100644 --- a/dumux/decoupled/2p2c/2p2cproblem.hh +++ b/dumux/decoupled/2p2c/2p2cproblem.hh @@ -202,7 +202,7 @@ protected: else if (equation == -1) { // set everything to zero - for (int i = 0; i < values.size(); i++) + for (unsigned int i = 0; i < values.size(); i++) values[i] = 0.; } else diff --git a/dumux/implicit/3p3c/3p3cmodel.hh b/dumux/implicit/3p3c/3p3cmodel.hh index 849fd3cbec..52db59e9f0 100644 --- a/dumux/implicit/3p3c/3p3cmodel.hh +++ b/dumux/implicit/3p3c/3p3cmodel.hh @@ -508,7 +508,7 @@ protected: */ void resetPhasePresence_() { - for (int i = 0; i < this->numDofs(); ++i) + for (unsigned int i = 0; i < this->numDofs(); ++i) { staticDat_[i].phasePresence = staticDat_[i].oldPhasePresence; @@ -521,7 +521,7 @@ protected: */ void updateOldPhasePresence_() { - for (int i = 0; i < this->numDofs(); ++i) + for (unsigned int i = 0; i < this->numDofs(); ++i) { staticDat_[i].oldPhasePresence = staticDat_[i].phasePresence; diff --git a/dumux/implicit/cellcentered/ccassembler.hh b/dumux/implicit/cellcentered/ccassembler.hh index 081a24ea72..eea8f575eb 100644 --- a/dumux/implicit/cellcentered/ccassembler.hh +++ b/dumux/implicit/cellcentered/ccassembler.hh @@ -123,7 +123,7 @@ private: } // set the discrepancy of the red elements to zero - for (int i = 0; i < this->delta_.size(); i++) + for (unsigned int i = 0; i < this->delta_.size(); i++) if (this->elementColor_[i] == ParentType::Red) this->delta_[i] = 0; } diff --git a/dumux/implicit/common/implicitassembler.hh b/dumux/implicit/common/implicitassembler.hh index cd0550d278..4b4081cf80 100644 --- a/dumux/implicit/common/implicitassembler.hh +++ b/dumux/implicit/common/implicitassembler.hh @@ -418,7 +418,7 @@ protected: // reset the parts needed for Jacobian recycling if (enableJacobianRecycling_()) { - for (int i = 0; i < matrix_->N(); i++) { + for (unsigned int i = 0; i < matrix_->N(); i++) { storageJacobian_[i] = 0; storageTerm_[i] = 0; } @@ -458,7 +458,7 @@ protected: // here and be done with it... Scalar curDt = problem_().timeManager().timeStepSize(); if (reuseMatrix_) { - for (int i = 0; i < matrix_->N(); i++) { + for (unsigned int i = 0; i < matrix_->N(); i++) { // rescale the mass term of the jacobian matrix MatrixBlock &J_i_i = (*matrix_)[i][i]; -- GitLab