Avoid unused variable warning.

The control_mode is unused if not build in debug mode since the assertion
will be skipped.
This commit is contained in:
Håkon Hægland 2020-10-02 11:17:48 +02:00
parent 52f6f819ee
commit a5ac74082a

View File

@ -51,7 +51,8 @@ GasLiftRuntime(
int well_index = this->std_well_.indexOfWell();
const Well::ProducerCMode& control_mode
= well_state_.currentProductionControls()[well_index];
assert(control_mode == Well::ProducerCMode::THP );
if (control_mode != Well::ProducerCMode::THP)
throw std::logic_error("Bug in flow - invalid control mode detected\n");
const Opm::Schedule& schedule = this->ebos_simulator_.vanguard().schedule();
const int report_step_idx = this->ebos_simulator_.episodeIndex();
auto ecl_well = this->std_well_.wellEcl();