From: wolf Date: Tue, 16 Mar 1999 19:45:36 +0000 (+0000) Subject: Allow for empty histograms, where left and right boundary are equal. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18da6a3f557b4c4bf34765510511a23e526c879c;p=dealii-svn.git Allow for empty histograms, where left and right boundary are equal. git-svn-id: https://svn.dealii.org/trunk@1016 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/numerics/histogram.cc b/deal.II/deal.II/source/numerics/histogram.cc index 7e203a549e..66a2bdbb3c 100644 --- a/deal.II/deal.II/source/numerics/histogram.cc +++ b/deal.II/deal.II/source/numerics/histogram.cc @@ -96,7 +96,12 @@ void Histogram::evaluate (const vector > &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;