diff --git a/ProcessLib/CoupledSolutionsForStaggeredScheme.cpp b/ProcessLib/CoupledSolutionsForStaggeredScheme.cpp index 9706bcfeaf594878154dccd259a0509e7b10836c..c62607fad476e93b5a274b3f2721d8e4c72a141a 100644 --- a/ProcessLib/CoupledSolutionsForStaggeredScheme.cpp +++ b/ProcessLib/CoupledSolutionsForStaggeredScheme.cpp @@ -52,6 +52,9 @@ std::vector<std::vector<double>> getCurrentLocalSolutions( const CoupledSolutionsForStaggeredScheme& cpl_xs, const std::vector<std::vector<GlobalIndexType>>& indices) { + if (cpl_xs.coupled_xs.empty()) + return {}; + const auto number_of_coupled_solutions = cpl_xs.coupled_xs.size(); std::vector<std::vector<double>> local_xs_t1; local_xs_t1.reserve(number_of_coupled_solutions);