diff --git a/opm/input/eclipse/Schedule/Well/WellInjectionControls.hpp b/opm/input/eclipse/Schedule/Well/WellInjectionControls.hpp index bee84043b..33fdd4f06 100644 --- a/opm/input/eclipse/Schedule/Well/WellInjectionControls.hpp +++ b/opm/input/eclipse/Schedule/Well/WellInjectionControls.hpp @@ -37,6 +37,22 @@ public: return (this->controls & static_cast(cmode_arg)) != 0; } + void skipControl(WellInjectorCMode cmode_arg) { + auto int_arg = static_cast(cmode_arg); + if ((this->controls & int_arg) != 0) + this->controls -= int_arg; + } + + void addControl(WellInjectorCMode cmode_arg) { + auto int_arg = static_cast(cmode_arg); + if ((this->controls & int_arg) == 0) + this->controls += int_arg; + } + + void clearControls(){ + this->controls = 0; + } + double bhp_limit; double thp_limit; diff --git a/opm/input/eclipse/Schedule/Well/WellProductionControls.hpp b/opm/input/eclipse/Schedule/Well/WellProductionControls.hpp index 7a3671b76..28bcb3ebc 100644 --- a/opm/input/eclipse/Schedule/Well/WellProductionControls.hpp +++ b/opm/input/eclipse/Schedule/Well/WellProductionControls.hpp @@ -50,6 +50,10 @@ public: this->controls += int_arg; } + void clearControls(){ + this->controls = 0; + } + bool operator==(const WellProductionControls& other) const { return this->cmode == other.cmode &&