Use ScheduleState for RFT configuration

This commit is contained in:
Joakim Hove 2021-02-18 10:47:59 +01:00
parent fc398c8555
commit b92f06544c

View File

@ -301,7 +301,7 @@ public:
// Well RFT data // Well RFT data
if (!substep) { if (!substep) {
const auto& schedule = simulator_.vanguard().schedule(); const auto& schedule = simulator_.vanguard().schedule();
const auto& rft_config = schedule.rftConfig(); const auto& rft_config = schedule[reportStepNum].rft_config();
for (const auto& well: schedule.getWells(reportStepNum)) { for (const auto& well: schedule.getWells(reportStepNum)) {
// don't bother with wells not on this process // don't bother with wells not on this process
@ -309,7 +309,7 @@ public:
continue; continue;
} }
if (!rft_config.active(reportStepNum)) if (!rft_config.active())
continue; continue;
for (const auto& connection: well.getConnections()) { for (const auto& connection: well.getConnections()) {
@ -927,7 +927,7 @@ public:
void addRftDataToWells(Opm::data::Wells& wellDatas, size_t reportStepNum) void addRftDataToWells(Opm::data::Wells& wellDatas, size_t reportStepNum)
{ {
const auto& schedule = simulator_.vanguard().schedule(); const auto& schedule = simulator_.vanguard().schedule();
const auto& rft_config = schedule.rftConfig(); const auto& rft_config = schedule[reportStepNum].rft_config();
for (const auto& well: schedule.getWells(reportStepNum)) { for (const auto& well: schedule.getWells(reportStepNum)) {
// don't bother with wells not on this process // don't bother with wells not on this process
@ -939,7 +939,7 @@ public:
if (!wellDatas.count(well.name())) { if (!wellDatas.count(well.name())) {
Opm::data::Well wellData; Opm::data::Well wellData;
if (!rft_config.active(reportStepNum)) if (!rft_config.active())
continue; continue;
wellData.connections.resize(well.getConnections().size()); wellData.connections.resize(well.getConnections().size());