diff options
Diffstat (limited to 'src/AB.c')
-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, |