From 5a34ba688810dd5471b3bff1a7d91b90a350d77e Mon Sep 17 00:00:00 2001 From: Simon Praetorius <simon.praetorius@tu-dresden.de> Date: Sat, 22 Feb 2025 11:40:22 +0100 Subject: [PATCH] Check that output indices are stored --- dune/istl/repartition.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dune/istl/repartition.hh b/dune/istl/repartition.hh index 164681084..c3041b62a 100644 --- a/dune/istl/repartition.hh +++ b/dune/istl/repartition.hh @@ -1820,8 +1820,9 @@ namespace Dune // DUNE_THROW(ISTLError, numOfOwnVtx<<"!="<<indexMap.globalOwnerVertices<<" owners missing or additional ones" // <<" during repartitioning."); // } - std::is_sorted(outputIndexSet.begin(), outputIndexSet.end(), - [](const auto& v1, const auto& v2){ return v1.global() < v2.global();}); + if (!std::is_sorted(outputIndexSet.begin(), outputIndexSet.end(), + [](const auto& v1, const auto& v2){ return v1.global() < v2.global();})) + DUNE_THROW(ISTLError, "OutputIndexSet is not sorted."); #endif if(verbose) { oocomm.communicator().barrier(); -- GitLab