]> https://gitweb.dealii.org/ - dealii.git/commitdiff
More places of avoiding infinities. 17941/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 18 Dec 2024 04:59:23 +0000 (21:59 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 18 Dec 2024 04:59:23 +0000 (21:59 -0700)
source/numerics/smoothness_estimator.cc

index e3bd24d6a4b08e4047a4097a810114755ea4a93d..b3bb5b2845274b4715706a63f6fb588534c8a67d 100644 (file)
@@ -236,7 +236,7 @@ namespace SmoothnessEstimator
 
               // choose the smallest decay of coefficients in each direction,
               // i.e. the maximum decay slope k_v as in exp(-k_v)
-              double k_v = std::numeric_limits<double>::infinity();
+              double k_v = std::numeric_limits<double>::max();
               for (unsigned int d = 0; d < dim; ++d)
                 {
                   x.resize(0);
@@ -521,7 +521,7 @@ namespace SmoothnessEstimator
 
               // choose the smallest decay of coefficients in each direction,
               // i.e. the maximum decay slope k_v as in exp(-k_v)
-              double k_v = std::numeric_limits<double>::infinity();
+              double k_v = std::numeric_limits<double>::max();
               for (unsigned int d = 0; d < dim; ++d)
                 {
                   x.resize(0);

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.