From: Wolfgang Bangerth Date: Fri, 9 Oct 2009 22:09:03 +0000 (+0000) Subject: Add optimization. X-Git-Tag: v8.0.0~6932 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf36c44963c60270f2d6ee4fbb6519184df29897;p=dealii.git Add optimization. git-svn-id: https://svn.dealii.org/trunk@19790 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/index_set.h b/deal.II/base/include/base/index_set.h index 8455d9843c..7b700f175f 100644 --- a/deal.II/base/include/base/index_set.h +++ b/deal.II/base/include/base/index_set.h @@ -197,8 +197,11 @@ IndexSet::add_range (const unsigned int begin, ExcIndexRange (begin, 0, index_space_size)); Assert (end <= index_space_size, ExcIndexRange (end, 0, index_space_size+1)); + Assert (begin <= end, + ExcIndexRange (begin, 0, end)); - contiguous_ranges.insert (ContiguousRange(begin,end)); + if (begin != end) + contiguous_ranges.insert (ContiguousRange(begin,end)); }