mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-15 11:13:11 -06:00
fixed: out-of-bounds reference with no wells
This commit is contained in:
parent
1d758706df
commit
c263ae9b66
@ -863,7 +863,9 @@ void WellState::communicateGroupRates(const Comm& comm)
|
|||||||
data[pos++] = 0;
|
data[pos++] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pos += this->alq_state.pack_data(&data[pos]);
|
if (!data.empty()) {
|
||||||
|
pos += this->alq_state.pack_data(&data[pos]);
|
||||||
|
}
|
||||||
assert(pos == sz);
|
assert(pos == sz);
|
||||||
|
|
||||||
// Communicate it with a single sum() call.
|
// Communicate it with a single sum() call.
|
||||||
@ -877,7 +879,9 @@ void WellState::communicateGroupRates(const Comm& comm)
|
|||||||
for (auto& value : rates)
|
for (auto& value : rates)
|
||||||
value = data[pos++];
|
value = data[pos++];
|
||||||
}
|
}
|
||||||
pos += this->alq_state.unpack_data(&data[pos]);
|
if (!data.empty()) {
|
||||||
|
pos += this->alq_state.unpack_data(&data[pos]);
|
||||||
|
}
|
||||||
assert(pos == sz);
|
assert(pos == sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user