diff options
author | eschnett <eschnett@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2013-02-21 03:04:55 +0000 |
---|---|---|
committer | eschnett <eschnett@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2013-02-21 03:04:55 +0000 |
commit | c2758f321926451671bc1b623e55cf0cb88952a2 (patch) | |
tree | a478124f9c697bac3c657cccc98f58488a96c216 | |
parent | a9f0413feeed50248b3e0eab55a76d96fe50ae58 (diff) |
Round via lrint() instead of floor()
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@193 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
-rw-r--r-- | src/AB.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -3,6 +3,7 @@ #include "cctk_Parameters.h" #include <assert.h> +#include <math.h> #include <stdlib.h> #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, |