mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-05 22:13:00 -06:00
fixed: do not take reference to a temporary
getWellsatEnd returns a temporary vector. it goes out of scope on the line, thus the reference taken is dangling.
This commit is contained in:
parent
d83b06c74b
commit
89443dd6a3
@ -105,9 +105,10 @@ public:
|
||||
const Schedule& deckSchedule = simulator_.vanguard().schedule();
|
||||
const auto& summaryState = simulator_.vanguard().summaryState();
|
||||
// create the wells which intersect with the current process' grid
|
||||
const auto wellsatEnd = deckSchedule.getWellsatEnd();
|
||||
for (size_t deckWellIdx = 0; deckWellIdx < deckSchedule.numWells(); ++deckWellIdx)
|
||||
{
|
||||
const auto& deckWell = deckSchedule.getWellsatEnd()[deckWellIdx];
|
||||
const auto& deckWell = wellsatEnd[deckWellIdx];
|
||||
const std::string& wellName = deckWell.name();
|
||||
Scalar wellTemperature = 273.15 + 15.56; // [K]
|
||||
if (deckWell.isInjector())
|
||||
|
Loading…
Reference in New Issue
Block a user