mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-22 17:26:27 -06:00
Throw if calling well_controls_current_distr() with -1 current index.
This commit is contained in:
parent
8438e84db1
commit
ffeb1529e8
@ -356,6 +356,8 @@ well_controls_iget_distr(const struct WellControls * ctrl, int control_index) {
|
||||
|
||||
const double *
|
||||
well_controls_get_current_distr(const struct WellControls * ctrl) {
|
||||
if (ctrl->current < 0)
|
||||
throw std::logic_error("Tried to use invalid current control < 0");
|
||||
return well_controls_iget_distr( ctrl , ctrl->current );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user