Merge pull request #3577 from joakim-hove/wtest-state-refactor

Use plain WellTestState::hasWellClosed() without reason
This commit is contained in:
Joakim Hove
2021-10-05 17:47:10 +02:00
committed by GitHub
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);