aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,