Merge pull request #3308 from akva2/fix_wells_at_end

fixed: do not take reference to a temporary
This commit is contained in:
Bård Skaflestad
2021-05-26 18:41:59 +02:00
committed by GitHub

View File

@@ -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())