]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Allow for empty histograms, where left and right boundary are equal.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Mar 1999 19:45:36 +0000 (19:45 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Mar 1999 19:45:36 +0000 (19:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@1016 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/histogram.cc

index 7e203a549e703b8508a824e68318a6ea84ce26af..66a2bdbb3c88385232c24bae789b447acb900672 100644 (file)
@@ -96,7 +96,12 @@ void Histogram::evaluate (const vector<Vector<number> > &values,
            Assert (false, ExcInternalError());
     };
   
-  Assert (max_value > min_value, ExcInvalidData());
+  Assert (max_value >= min_value, ExcInvalidData());
+
+                                  // move right bound arbitrarily if
+                                  // necessary
+  if (max_value == min_value)
+    max_value = min_value+1;
   
 
 

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.