From: Daniel Arndt Date: Fri, 5 Jun 2020 16:32:06 +0000 (-0400) Subject: Fix IndexSet::is_ascending_and_one_to_one for empty objects X-Git-Tag: v9.3.0-rc1~1478^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80954da5b612fda22ab7843653e881f07c5bdf76;p=dealii.git Fix IndexSet::is_ascending_and_one_to_one for empty objects --- 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 =