From ee1eb83d270a87dcd5a382e632ea2d1e33b23559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Ospina=20De=20Los=20R=C3=ADos?= Date: Mon, 6 Oct 2025 20:15:23 +0200 Subject: [PATCH] Uses lowest() instead of min/max for initial value Replaces the custom handling (post g++-4.4) of minimum and maximum values for integral and floating-point types with std::numeric_limits::lowest(). --- opm/simulators/linalg/ParallelIstlInformation.hpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/opm/simulators/linalg/ParallelIstlInformation.hpp b/opm/simulators/linalg/ParallelIstlInformation.hpp index ca14dbbbfe..4037c10af6 100644 --- a/opm/simulators/linalg/ParallelIstlInformation.hpp +++ b/opm/simulators/linalg/ParallelIstlInformation.hpp @@ -254,17 +254,7 @@ private: template T getInitialValue() { - //g++-4.4 does not support std::numeric_limits::lowest(); - // we rely on IEE 754 for floating point values and use min() - // for integral types. - if( std::is_integral::value ) - { - return std::numeric_limits::min(); - } - else - { - return -std::numeric_limits::max(); - } + return std::numeric_limits::lowest(); } /// \brief Get the underlying binary operator. ///