Add access to injection controls

This commit is contained in:
Stein Krogstad
2023-07-04 15:17:10 +02:00
parent 703431ce61
commit 6ecabdbd7b
2 changed files with 20 additions and 0 deletions

View File

@@ -37,6 +37,22 @@ public:
return (this->controls & static_cast<int>(cmode_arg)) != 0;
}
void skipControl(WellInjectorCMode cmode_arg) {
auto int_arg = static_cast<int>(cmode_arg);
if ((this->controls & int_arg) != 0)
this->controls -= int_arg;
}
void addControl(WellInjectorCMode cmode_arg) {
auto int_arg = static_cast<int>(cmode_arg);
if ((this->controls & int_arg) == 0)
this->controls += int_arg;
}
void clearControls(){
this->controls = 0;
}
double bhp_limit;
double thp_limit;

View File

@@ -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 &&