34 controls(controls_arg)
37 bool hasControl(WellInjectorCMode cmode_arg)
const
39 return (this->controls &
static_cast<int>(cmode_arg)) != 0;
42 void skipControl(WellInjectorCMode cmode_arg) {
43 auto int_arg =
static_cast<int>(cmode_arg);
44 if ((this->controls & int_arg) != 0)
45 this->controls -= int_arg;
48 void addControl(WellInjectorCMode cmode_arg) {
49 auto int_arg =
static_cast<int>(cmode_arg);
50 if ((this->controls & int_arg) == 0)
51 this->controls += int_arg;
58 bool anyZeroRateConstraint()
const {
59 auto is_zero = [](
const double x)
61 return std::isfinite(x) && !std::isnormal(x);
64 if (this->hasControl(WellInjectorCMode::RATE) && is_zero(this->surface_rate) ) {
68 if (this->hasControl(WellInjectorCMode::RESV) && is_zero(this->reservoir_rate) ) {
78 InjectorType injector_type;
79 WellInjectorCMode cmode = WellInjectorCMode::CMODE_UNDEFINED;
81 double reservoir_rate;
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30