mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-30 11:06:55 -06:00
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:
parent
86b71e7d48
commit
f50dc9507f
@ -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.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user