aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreschnett <eschnett@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2013-02-21 03:04:55 +0000
committereschnett <eschnett@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2013-02-21 03:04:55 +0000
commitc2758f321926451671bc1b623e55cf0cb88952a2 (patch)
treea478124f9c697bac3c657cccc98f58488a96c216
parenta9f0413feeed50248b3e0eab55a76d96fe50ae58 (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.c3
1 files changed, 2 insertions, 1 deletions
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 <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,