From c2758f321926451671bc1b623e55cf0cb88952a2 Mon Sep 17 00:00:00 2001 From: eschnett Date: Thu, 21 Feb 2013 03:04:55 +0000 Subject: Round via lrint() instead of floor() git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@193 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b --- src/AB.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AB.c b/src/AB.c index ee7fdad..872c31c 100644 --- a/src/AB.c +++ b/src/AB.c @@ -3,6 +3,7 @@ #include "cctk_Parameters.h" #include +#include #include #include "ExternalVariables.h" @@ -178,7 +179,7 @@ void MoL_ABAdd(CCTK_ARGUMENTS) if (AB_initially_reduce_order) { /* Reduce the order for the first time steps */ /* int const iteration = cctk_iteration; */ - int const iteration = 1 + floor((cctk_time - cctk_initial_time) / dt + 0.5); + int const iteration = 1 + lrint((cctk_time - cctk_initial_time) / dt); if (order > iteration) { order = iteration; CCTK_VInfo (CCTK_THORNSTRING, -- cgit v1.2.3