Do not include shut wells in the well name to index map
The name to index map is used to make sure the correct wellstate values are associated with the corresponding well. Shut wells should be excluded from this mapping as no date is for shut wells are found in the wellstates, instead 0 is outputed for the shut wells.
This commit is contained in:
parent
665f08592c
commit
75749c3dab
@ -787,8 +787,12 @@ void Summary::writeTimeStep(int reportStepIdx,
|
|||||||
const Opm::ScheduleConstPtr schedule = eclipseState_->getSchedule();
|
const Opm::ScheduleConstPtr schedule = eclipseState_->getSchedule();
|
||||||
const auto& timeStepWells = schedule->getWells(reportStepIdx);
|
const auto& timeStepWells = schedule->getWells(reportStepIdx);
|
||||||
std::map<std::string, int> wellNameToIdxMap;
|
std::map<std::string, int> wellNameToIdxMap;
|
||||||
|
int openWellIdx = 0;
|
||||||
for (size_t tsWellIdx = 0; tsWellIdx < timeStepWells.size(); ++tsWellIdx) {
|
for (size_t tsWellIdx = 0; tsWellIdx < timeStepWells.size(); ++tsWellIdx) {
|
||||||
wellNameToIdxMap[timeStepWells[tsWellIdx]->name()] = tsWellIdx;
|
if (timeStepWells[tsWellIdx]->getStatus(timer.currentStepNum()) != WellCommon::SHUT ) {
|
||||||
|
wellNameToIdxMap[timeStepWells[tsWellIdx]->name()] = openWellIdx;
|
||||||
|
openWellIdx++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// internal view; do not move this code out of Summary!
|
// internal view; do not move this code out of Summary!
|
||||||
|
Loading…
Reference in New Issue
Block a user