diff --git a/src/const.h b/src/const.h index f0ee6318064403d742c1ec4f7cf6a770b567238a..4b46ec1cb094f8bae630e432bf4a75469357ca9b 100644 --- a/src/const.h +++ b/src/const.h @@ -59,6 +59,6 @@ #define SOURCETERMS_NONE //#define SOURCETERMS_SN_FEEDBACK -#define ICHECK 116650 +#define ICHECK -116650 #endif /* SWIFT_CONST_H */ diff --git a/src/hydro/Gadget2/hydro.h b/src/hydro/Gadget2/hydro.h index ace32c1904f65739c00af88ac36ca0858ba52d46..9c5f51160f3d79d44caa60b57237f976dc33ade7 100644 --- a/src/hydro/Gadget2/hydro.h +++ b/src/hydro/Gadget2/hydro.h @@ -288,8 +288,8 @@ __attribute__((always_inline)) INLINE static void hydro_end_density( * @param timeBase The minimal time-step size */ __attribute__((always_inline)) INLINE static void hydro_prepare_force( - struct part *restrict p, struct xpart *restrict xp, int ti_current, - double timeBase) { + struct part *restrict p, struct xpart *restrict xp, + integertime_t ti_current, double timeBase) { const float fac_mu = 1.f; /* Will change with cosmological integration */ diff --git a/src/space.c b/src/space.c index 86611d3816dc41f3129934c9ee92fc9889a3c5ac..23e97d998dbce6ecea2f2bd89c692303030f789e 100644 --- a/src/space.c +++ b/src/space.c @@ -246,7 +246,7 @@ void space_regrid(struct space *s, int verbose) { const size_t nr_parts = s->nr_parts; const ticks tic = getticks(); - const int ti_current = (s->e != NULL) ? s->e->ti_current : 0; + const integertime_t ti_current = (s->e != NULL) ? s->e->ti_current : 0; /* Run through the cells and get the current h_max. */ // tic = getticks(); @@ -480,7 +480,7 @@ void space_rebuild(struct space *s, int verbose) { size_t nr_parts = s->nr_parts; size_t nr_gparts = s->nr_gparts; struct cell *restrict cells_top = s->cells_top; - const int ti_current = (s->e != NULL) ? s->e->ti_current : 0; + const integertime_t ti_current = (s->e != NULL) ? s->e->ti_current : 0; /* Run through the particles and get their cell index. Allocates an index that is larger than the number of particles to avoid diff --git a/src/timeline.h b/src/timeline.h index d9691ef846a70e7886c545055a790f8e3aa3c9d9..88f0c6f48b781674bbf22798dce2df181e0c1378 100644 --- a/src/timeline.h +++ b/src/timeline.h @@ -56,7 +56,7 @@ static INLINE integertime_t get_integer_timestep(timebin_t bin) { static INLINE timebin_t get_time_bin(integertime_t time_step) { /* ((int) log_2(time_step)) - 1 */ - return 62 - intrinsics_clzll(time_step); + return (timebin_t)(62 - intrinsics_clzll(time_step)); } /**