]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add optimization.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 9 Oct 2009 22:09:03 +0000 (22:09 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 9 Oct 2009 22:09:03 +0000 (22:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@19790 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/index_set.h

index 8455d9843c39357c359b42a42305a2800fb28b50..7b700f175f7e373fd098e7b25eba96789831643c 100644 (file)
@@ -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));
 }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.