Skip to content

Commit

Permalink
Improve assert message in DictionaryPayLoad
Browse files Browse the repository at this point in the history
  • Loading branch information
peterrum committed Nov 13, 2021
1 parent ae370f6 commit 5e5ae0d
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions include/deal.II/base/mpi_compute_index_owner_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ namespace Utilities
, actually_owning_ranks(actually_owning_ranks)
, local_range(local_range)
, actually_owning_rank_list(actually_owning_rank_list)
{}
{
Assert(local_range.first < local_range.second, ExcInternalError());
}

/**
* Implementation of
Expand Down Expand Up @@ -114,15 +116,19 @@ namespace Utilities
for (types::global_dof_index i = interval.first;
i < interval.second;
i++)
Assert(actually_owning_ranks[i - local_range.first] ==
numbers::invalid_unsigned_int,
ExcInternalError());
Assert(interval.first >= local_range.first &&
interval.first < local_range.second,
ExcInternalError());
Assert(interval.second > local_range.first &&
interval.second <= local_range.second,
ExcInternalError());
Assert(
actually_owning_ranks[i - local_range.first] ==
numbers::invalid_unsigned_int,
ExcMessage(
"Multiple processes seem to own the same global index. "
"A possible reason is that the sets of locally owned "
"indices are not distinct."));
Assert(interval.first < interval.second, ExcInternalError());
Assert(
local_range.first <= interval.first &&
interval.second <= local_range.second,
ExcMessage(
"The specified interval is not handled by the current process."));
#endif
std::fill(actually_owning_ranks.data() + interval.first -
local_range.first,
Expand Down

0 comments on commit 5e5ae0d

Please sign in to comment.