silencing some compilation warnings.

This commit is contained in:
Kai Bao 2019-04-12 12:27:02 +02:00
parent 88fb158067
commit 5a34922d11
3 changed files with 4 additions and 5 deletions

View File

@ -1737,7 +1737,7 @@ namespace Opm {
const auto& segments = well.segments;
// \Note: eventually we need to hanlde the situations that some segments are shut
assert(segment_set.size() == segments.size());
assert(int(segment_set.size()) == segments.size());
for (const auto& segment : segments) {
const int segment_index = segment_set.segmentNumberToIndex(segment.first);

View File

@ -69,7 +69,7 @@ namespace Opm
// side
int i_perf_wells = 0;
perf_depth_.resize(number_of_perforations_, 0.);
for (int perf = 0; perf < completion_set.size(); ++perf) {
for (size_t perf = 0; perf < completion_set.size(); ++perf) {
const Connection& connection = completion_set.get(perf);
if (connection.state() == WellCompletion::OPEN) {
const int segment_index = segmentNumberToIndex(connection.segment());
@ -2176,7 +2176,7 @@ namespace Opm
// TODO: maybe we should distinguish the bhp control or rate control equations here
for (int seg = 0; seg < numberOfSegments(); ++seg) {
for (int eq_idx = 0; eq_idx < numWellEq; ++eq_idx) {
double residual;
double residual = 0.;
if (eq_idx < num_components_) {
residual = std::abs(resWell_[seg][eq_idx]) * B_avg[eq_idx];
} else {
@ -2225,7 +2225,6 @@ namespace Opm
}
stagnate = true;
int oscillate_eqs = 0;
const double F0 = measure_history[it];
const double F1 = measure_history[it - 1];
const double F2 = measure_history[it - 2];

View File

@ -665,7 +665,7 @@ namespace Opm
// we need to know for each segment, how many perforation it has and how many segments using it as outlet_segment
// that is why I think we should use a well model to initialize the WellState here
std::vector<std::vector<int>> segment_perforations(well_nseg);
for (int perf = 0; perf < completion_set.size(); ++perf) {
for (size_t perf = 0; perf < completion_set.size(); ++perf) {
const Connection& connection = completion_set.get(perf);
if (connection.state() == WellCompletion::OPEN) {
const int segment_index = segment_set.segmentNumberToIndex(connection.segment());