Remove Schedule::evalAction() and add Schedule::actions()

This commit is contained in:
Joakim Hove
2019-01-22 16:33:17 +01:00
parent 749353a4b0
commit 4174602da2
3 changed files with 5 additions and 7 deletions

View File

@@ -135,7 +135,7 @@ namespace Opm
const WellTestConfig& wtestConfig(size_t timestep) const;
const WListManager& getWListManager(size_t timeStep) const;
const Actions& actionConfig() const;
const Actions& actions() const;
void evalAction(const SummaryState& summary_state, size_t timeStep);
const GroupTree& getGroupTree(size_t t) const;
@@ -179,7 +179,7 @@ namespace Opm
DynamicState<std::shared_ptr<WListManager>> wlist_manager;
WellProducer::ControlModeEnum m_controlModeWHISTCTL;
Actions actions;
Actions m_actions;
std::vector< Well* > getWells(const std::string& wellNamePattern);
std::vector< Group* > getGroups(const std::string& groupNamePattern);

View File

@@ -377,7 +377,7 @@ namespace Opm {
} else
action.addKeyword(action_keyword);
}
this->actions.add(action);
this->m_actions.add(action);
} else
this->handleKeyword(currentStep, section, keywordIdx, keyword, parseContext, errors, grid, eclipseProperties, unit_system, rftProperties);
@@ -2155,9 +2155,8 @@ namespace Opm {
}
void Schedule::evalAction(const SummaryState& /* st */, size_t /* timeStep */) {
if (this->actions.empty())
return;
const Actions& Schedule::actions() const {
return this->m_actions;
}
}

View File

@@ -2637,7 +2637,6 @@ VFPINJ \n \
Runspec runspec (deck);
Schedule schedule(deck, grid1 , eclipseProperties, runspec);
schedule.evalAction(SummaryState(), 5);
BOOST_CHECK( schedule.getEvents().hasEvent(ScheduleEvents::VFPINJ_UPDATE, 0));
BOOST_CHECK( !schedule.getEvents().hasEvent(ScheduleEvents::VFPINJ_UPDATE, 1));
BOOST_CHECK( schedule.getEvents().hasEvent(ScheduleEvents::VFPINJ_UPDATE, 2));