diff --git a/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp b/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp index e64a03bcb..c491c9495 100644 --- a/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp +++ b/opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp @@ -491,7 +491,14 @@ namespace Opm { std::ostringstream msg; msg << " Excessive chopping detected in report step " << sr.back().report_step << ", substep " << sr.back().current_step << "\n"; - assert(!sr.back().report.empty()); + + std::set failing_wells; + + // return empty set if no report exists + // well failures in assembly is not yet registred + if(sr.back().report.empty()) + return failing_wells; + const auto& wfs = sr.back().report.back().wellFailures(); for (const auto& wf : wfs) { msg << " Well that failed: " << wf.wellName() << "\n"; @@ -504,7 +511,6 @@ namespace Opm { const int rep_step = sr.back().report_step; const int sub_step = sr.back().current_step; const int sr_size = sr.size(); - std::set failing_wells; for (const auto& wf : wfs) { failing_wells.insert(wf.wellName()); }