Merge pull request #678 from totto82/fix_eclipseWriter

Do not include shut wells in the well name to index map
This commit is contained in:
Atgeirr Flø Rasmussen committed 2014-11-13 08:29:54 +01:00
commit 66b217a732
1 file changed
+5 -1
+5 -1
View File
@@ -787,8 +787,12 @@ void Summary::writeTimeStep(int reportStepIdx,
const Opm::ScheduleConstPtr schedule = eclipseState_->getSchedule();
const auto& timeStepWells = schedule->getWells(reportStepIdx);
std::map<std::string, int> wellNameToIdxMap;
int openWellIdx = 0;
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!