Skip to content
Snippets Groups Projects
Commit 4799b198 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Also make use of the new data type for time in the space

parent 9d579c4b
No related branches found
No related tags found
1 merge request!301New time line
...@@ -59,6 +59,6 @@ ...@@ -59,6 +59,6 @@
#define SOURCETERMS_NONE #define SOURCETERMS_NONE
//#define SOURCETERMS_SN_FEEDBACK //#define SOURCETERMS_SN_FEEDBACK
#define ICHECK 116650 #define ICHECK -116650
#endif /* SWIFT_CONST_H */ #endif /* SWIFT_CONST_H */
...@@ -288,8 +288,8 @@ __attribute__((always_inline)) INLINE static void hydro_end_density( ...@@ -288,8 +288,8 @@ __attribute__((always_inline)) INLINE static void hydro_end_density(
* @param timeBase The minimal time-step size * @param timeBase The minimal time-step size
*/ */
__attribute__((always_inline)) INLINE static void hydro_prepare_force( __attribute__((always_inline)) INLINE static void hydro_prepare_force(
struct part *restrict p, struct xpart *restrict xp, int ti_current, struct part *restrict p, struct xpart *restrict xp,
double timeBase) { integertime_t ti_current, double timeBase) {
const float fac_mu = 1.f; /* Will change with cosmological integration */ const float fac_mu = 1.f; /* Will change with cosmological integration */
......
...@@ -246,7 +246,7 @@ void space_regrid(struct space *s, int verbose) { ...@@ -246,7 +246,7 @@ void space_regrid(struct space *s, int verbose) {
const size_t nr_parts = s->nr_parts; const size_t nr_parts = s->nr_parts;
const ticks tic = getticks(); 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. */ /* Run through the cells and get the current h_max. */
// tic = getticks(); // tic = getticks();
...@@ -480,7 +480,7 @@ void space_rebuild(struct space *s, int verbose) { ...@@ -480,7 +480,7 @@ void space_rebuild(struct space *s, int verbose) {
size_t nr_parts = s->nr_parts; size_t nr_parts = s->nr_parts;
size_t nr_gparts = s->nr_gparts; size_t nr_gparts = s->nr_gparts;
struct cell *restrict cells_top = s->cells_top; 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 /* Run through the particles and get their cell index. Allocates
an index that is larger than the number of particles to avoid an index that is larger than the number of particles to avoid
......
...@@ -56,7 +56,7 @@ static INLINE integertime_t get_integer_timestep(timebin_t bin) { ...@@ -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) { static INLINE timebin_t get_time_bin(integertime_t time_step) {
/* ((int) log_2(time_step)) - 1 */ /* ((int) log_2(time_step)) - 1 */
return 62 - intrinsics_clzll(time_step); return (timebin_t)(62 - intrinsics_clzll(time_step));
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment