Use plain WellTestState::hasWellClosed() without reason

This commit is contained in:
Joakim Hove 2021-10-05 16:28:32 +02:00
parent b0fbc1a6dc
commit f27a82ebc3
2 changed files with 2 additions and 4 deletions

View File

@ -617,8 +617,7 @@ namespace Opm {
// TODO: should we do this for all kinds of closing reasons? // TODO: should we do this for all kinds of closing reasons?
// something like wellTestState().hasWell(well_name)? // something like wellTestState().hasWell(well_name)?
bool wellIsStopped = false; bool wellIsStopped = false;
if (wellTestState().hasWellClosed(well_name, WellTestConfig::Reason::ECONOMIC) || if (wellTestState().hasWellClosed(well_name))
wellTestState().hasWellClosed(well_name, WellTestConfig::Reason::PHYSICAL))
{ {
if (well_ecl.getAutomaticShutIn()) { if (well_ecl.getAutomaticShutIn()) {
// shut wells are not added to the well container // shut wells are not added to the well container

View File

@ -353,8 +353,7 @@ void WellInterfaceGeneric::updateWellTestStatePhysical(const double simulation_t
DeferredLogger& deferred_logger) const DeferredLogger& deferred_logger) const
{ {
if (!isOperableAndSolvable()) { if (!isOperableAndSolvable()) {
if (well_test_state.hasWellClosed(name(), WellTestConfig::Reason::ECONOMIC) || if (well_test_state.hasWellClosed(name())) {
well_test_state.hasWellClosed(name(), WellTestConfig::Reason::PHYSICAL) ) {
// Already closed, do nothing. // Already closed, do nothing.
} else { } else {
well_test_state.closeWell(name(), WellTestConfig::Reason::PHYSICAL, simulation_time); well_test_state.closeWell(name(), WellTestConfig::Reason::PHYSICAL, simulation_time);