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?
// something like wellTestState().hasWell(well_name)?
bool wellIsStopped = false;
if (wellTestState().hasWellClosed(well_name, WellTestConfig::Reason::ECONOMIC) ||
wellTestState().hasWellClosed(well_name, WellTestConfig::Reason::PHYSICAL))
if (wellTestState().hasWellClosed(well_name))
{
if (well_ecl.getAutomaticShutIn()) {
// 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
{
if (!isOperableAndSolvable()) {
if (well_test_state.hasWellClosed(name(), WellTestConfig::Reason::ECONOMIC) ||
well_test_state.hasWellClosed(name(), WellTestConfig::Reason::PHYSICAL) ) {
if (well_test_state.hasWellClosed(name())) {
// Already closed, do nothing.
} else {
well_test_state.closeWell(name(), WellTestConfig::Reason::PHYSICAL, simulation_time);