diff --git a/opm/autodiff/SimulatorBase_impl.hpp b/opm/autodiff/SimulatorBase_impl.hpp index fe85fad15..581779ba6 100644 --- a/opm/autodiff/SimulatorBase_impl.hpp +++ b/opm/autodiff/SimulatorBase_impl.hpp @@ -53,8 +53,8 @@ namespace Opm output_writer_(output_writer), rateConverter_(props_, std::vector(AutoDiffGrid::numCells(grid_), 0)), threshold_pressures_by_face_(threshold_pressures_by_face), - is_parallel_run_( false ), - vfpProperties_(eclipse_state->getVFPProdTables()) + vfpProperties_(eclipse_state->getVFPProdTables()), + is_parallel_run_( false ) { // Misc init. const int num_cells = AutoDiffGrid::numCells(grid); @@ -440,14 +440,16 @@ namespace Opm well_controls_assert_number_of_phases(ctrl, int(np)); const int ok_resv = - well_controls_add_new(RESERVOIR_RATE, target, -1e100, -1e100, + well_controls_add_new(RESERVOIR_RATE, target, + -std::numeric_limits::max(), -std::numeric_limits::max(), & distr[0], ctrl); // For WCONHIST/RESV the BHP limit is set to 1 atm. // TODO: Make it possible to modify the BHP limit using // the WELTARG keyword const int ok_bhp = - well_controls_add_new(BHP, unit::convert::from(1.0, unit::atm), -1e100, -1e100, + well_controls_add_new(BHP, unit::convert::from(1.0, unit::atm), + -std::numeric_limits::max(), -std::numeric_limits::max(), NULL, ctrl); if (ok_resv != 0 && ok_bhp != 0) {