From 554967005b1417247436c5df382c67bf6623aaa7 Mon Sep 17 00:00:00 2001 From: Vegard Kippe Date: Fri, 10 Jan 2025 18:45:53 +0100 Subject: [PATCH] Do not try to restore segment info for inactive wells --- opm/simulators/wells/BlackoilWellModelRestart.cpp | 2 +- opm/simulators/wells/WellState.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opm/simulators/wells/BlackoilWellModelRestart.cpp b/opm/simulators/wells/BlackoilWellModelRestart.cpp index 498e665fb..472e160b1 100644 --- a/opm/simulators/wells/BlackoilWellModelRestart.cpp +++ b/opm/simulators/wells/BlackoilWellModelRestart.cpp @@ -256,7 +256,7 @@ loadRestartData(const data::Wells& rst_wells, { const auto& well_name = well_state.name(well_index); - this->loadRestartWellData(well_name, handle_ms_well, phs, + this->loadRestartWellData(well_name, handle_ms_well & !well_state.is_permanently_inactive_well(well_name), phs, rst_wells.at(well_name), wellModel_.perfData(well_index), well_state.well(well_index)); diff --git a/opm/simulators/wells/WellState.hpp b/opm/simulators/wells/WellState.hpp index fb5e4d063..1d4f4bf85 100644 --- a/opm/simulators/wells/WellState.hpp +++ b/opm/simulators/wells/WellState.hpp @@ -360,13 +360,13 @@ public: serializer(permanently_inactive_well_names_); } -private: - bool enableDistributedWells_ = false; - bool is_permanently_inactive_well(const std::string& wname) const { return std::find(this->permanently_inactive_well_names_.begin(), this->permanently_inactive_well_names_.end(), wname) != this->permanently_inactive_well_names_.end(); } +private: + bool enableDistributedWells_ = false; + PhaseUsage phase_usage_; // The wells_ variable is essentially a map of all the wells on the current