fix a few pesky sign comparison warnings

the problem here is that some types used as the `BVector` template
parameters return signed integers for the `size()` method, others
return unsigned ones.
This commit is contained in:
Andreas Lauser 2017-01-09 12:05:32 +01:00
parent 86b71e7d48
commit f50dc9507f

View File

@ -260,24 +260,28 @@ namespace Opm
dxOld = dx;
switch (relaxType()) {
case DAMPEN:
case DAMPEN: {
if (omega == 1.) {
return;
}
for (size_t i = 0; i < dx.size(); ++i) {
auto i = dx.size();
for (i = 0; i < dx.size(); ++i) {
dx[i] *= omega;
}
return;
case SOR:
}
case SOR: {
if (omega == 1.) {
return;
}
for (size_t i = 0; i < dx.size(); ++i) {
auto i = dx.size();
for (i = 0; i < dx.size(); ++i) {
dx[i] *= omega;
tempDxOld[i] *= (1.-omega);
dx[i] += tempDxOld[i];
}
return;
}
default:
OPM_THROW(std::runtime_error, "Can only handle DAMPEN and SOR relaxation type.");
}