From 1ede92743283275c1af0c94c2e2ee19f2cd11b55 Mon Sep 17 00:00:00 2001 From: Andy Nonaka Date: Mon, 16 Sep 2024 12:42:52 -0700 Subject: [PATCH] almostEqual for arbitrary floating point types --- Src/Base/AMReX_RKIntegrator.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Base/AMReX_RKIntegrator.H b/Src/Base/AMReX_RKIntegrator.H index 97ad4284f2..6a31f3cdfd 100644 --- a/Src/Base/AMReX_RKIntegrator.H +++ b/Src/Base/AMReX_RKIntegrator.H @@ -252,7 +252,7 @@ public: { // Adjust step size to reach output time // protect against roundoff - if (std::abs(time_out - time_current - dt) <= 1.e5 * std::numeric_limits::epsilon() * std::abs(dt)) { + if (almostEqual(std::abs(time_out-time_current), std::abs(dt)), 10.) { dt = time_out - time_current; stop = true; }