mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5264 from akva2/fix_oob_no_wells
fixed: out-of-bounds reference with no wells
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user