From 164f809ee5fcd6fb9088f015f8461ff46f651102 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Thu, 10 Dec 2015 11:22:23 -0200 Subject: [PATCH] Revert "INTERPOLATIONS: Make sure MC, VL, and SB limiters do not overshoot." This reverts commit 99cc1ca2abcf3e52ecfcf6bc66ee051cf034bbce. --- src/interpolations.F90 | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/interpolations.F90 b/src/interpolations.F90 index d74511b..8d5eba4 100644 --- a/src/interpolations.F90 +++ b/src/interpolations.F90 @@ -2954,15 +2954,10 @@ module interpolations ! real(kind=8), intent(in) :: x, a, b real(kind=8) :: c - -! local variables -! - real(kind=8) :: y ! !------------------------------------------------------------------------------- ! - y = x - eps - c = (sign(y, a) + sign(y, b)) * min(abs(a), abs(b), 2.5d-01 * abs(a + b)) + c = (sign(x, a) + sign(x, b)) * min(abs(a), abs(b), 2.5d-01 * abs(a + b)) !------------------------------------------------------------------------------- ! @@ -2993,16 +2988,11 @@ module interpolations ! real(kind=8), intent(in) :: x, a, b real(kind=8) :: c - -! local variables -! - real(kind=8) :: y ! !------------------------------------------------------------------------------- ! - y = x - eps - c = (sign(y, a) + sign(y, b)) & - * max(min(abs(a), 0.5d+00 * abs(b)), min(0.5d+00 * abs(a), abs(b))) + c = 0.5d+00 * (sign(x, a) + sign(x, b)) & + * max(min(2.0d+00 * abs(a), abs(b)), min(abs(a), 2.0d+00 * abs(b))) !------------------------------------------------------------------------------- ! @@ -3038,7 +3028,7 @@ module interpolations ! c = a * b if (c > 0.0d+00) then - c = 2.0d+00 * (x - eps) * c / (a + b) + c = 2.0d+00 * x * c / (a + b) else c = 0.0d+00 end if