From 80954da5b612fda22ab7843653e881f07c5bdf76 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 5 Jun 2020 12:32:06 -0400 Subject: [PATCH] Fix IndexSet::is_ascending_and_one_to_one for empty objects --- source/base/index_set.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/base/index_set.cc b/source/base/index_set.cc index 9b833fcb7c..8815d6919b 100644 --- a/source/base/index_set.cc +++ b/source/base/index_set.cc @@ -672,6 +672,9 @@ IndexSet::is_ascending_and_one_to_one(const MPI_Comm &communicator) const if (n_global_elements != size()) return false; + if (n_global_elements == 0) + return true; + #ifdef DEAL_II_WITH_MPI // Non-contiguous IndexSets can't be linear. const bool all_contiguous = -- 2.39.5