From cbae23e8f6eaf4e0f1fef873f7d5ded1ecafb199 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Fri, 8 Nov 2019 11:16:07 -0500 Subject: [PATCH] fix index types --- include/deal.II/base/index_set.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/include/deal.II/base/index_set.h b/include/deal.II/base/index_set.h index a240e65673..628185e8b6 100644 --- a/include/deal.II/base/index_set.h +++ b/include/deal.II/base/index_set.h @@ -261,7 +261,7 @@ public: * n_elements(). */ size_type - nth_index_in_set(const unsigned int local_index) const; + nth_index_in_set(const size_type local_index) const; /** * Return the how-manyth element of this set (counted in ascending order) @p @@ -286,8 +286,15 @@ public: /** * This function returns the local index of the beginning of the largest * range. + * + * In other words, the return value is nth_index_in_set(x), where x is the + * index of the largest contiguous range of indices in the IndexSet. The value + * is therefore equal to the number of elements in the set that come before + * the largest range. + * + * This call assumes that the IndexSet is nonempty. */ - unsigned int + size_type largest_range_starting_index() const; /** @@ -1829,7 +1836,7 @@ IndexSet::n_intervals() const -inline unsigned int +inline IndexSet::size_type IndexSet::largest_range_starting_index() const { Assert(ranges.empty() == false, ExcMessage("IndexSet cannot be empty.")); @@ -1844,7 +1851,7 @@ IndexSet::largest_range_starting_index() const inline IndexSet::size_type -IndexSet::nth_index_in_set(const unsigned int n) const +IndexSet::nth_index_in_set(const size_type n) const { Assert(n < n_elements(), ExcIndexRangeType(n, 0, n_elements())); -- 2.39.5