diff --git a/opm/simulators/wells/WellState.cpp b/opm/simulators/wells/WellState.cpp index 4277ec920..eb5179e86 100644 --- a/opm/simulators/wells/WellState.cpp +++ b/opm/simulators/wells/WellState.cpp @@ -821,7 +821,7 @@ void WellState::initWellStateMSWell(const std::vector& wells_ecl, // for the seg_rates_, now it becomes a recursive solution procedure. { // make sure the information from wells_ecl consistent with wells - assert((n_activeperf == num_perf_this_well) && + assert((n_activeperf == this->wellMap().at(well_ecl.name())[2]) && "Inconsistent number of reservoir connections in well"); if (pu.phase_used[Gas]) {