From 5ee2948e0aa64c6fb5e3842aa5ff879c2cee65bd Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Fri, 20 May 2016 17:57:24 +0100 Subject: [PATCH] Cleaning-up --- src/kick.h | 4 ++++ src/runner.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/kick.h b/src/kick.h index 20ccca1eeb..df3bd4cc6c 100644 --- a/src/kick.h +++ b/src/kick.h @@ -22,6 +22,10 @@ /* Config parameters. */ #include "../config.h" +/* Local headers. */ +#include "const.h" +#include "debug.h" + /** * @brief Perform the 'kick' operation on a #gpart * diff --git a/src/runner.c b/src/runner.c index 0b630b6f99..80dfb0fbef 100644 --- a/src/runner.c +++ b/src/runner.c @@ -989,6 +989,10 @@ void runner_do_kick_fixdt(struct runner *r, struct cell *c, int timer) { updated++; if (p->gpart != NULL) g_updated++; + /* Minimal time for next end of time-step */ + ti_end_min = min(p->ti_end, ti_end_min); + ti_end_max = max(p->ti_end, ti_end_max); + /* Now collect quantities for statistics */ const double x[3] = {p->x[0], p->x[1], p->x[2]}; @@ -1013,10 +1017,6 @@ void runner_do_kick_fixdt(struct runner *r, struct cell *c, int timer) { v_full[2] * v_full[2]); e_pot += 0.f; /* No gravitational potential thus far */ e_int += hydro_get_internal_energy(p); - - /* Minimal time for next end of time-step */ - ti_end_min = min(p->ti_end, ti_end_min); - ti_end_max = max(p->ti_end, ti_end_max); } } @@ -1246,6 +1246,10 @@ void runner_do_kick(struct runner *r, struct cell *c, int timer) { if (p->gpart != NULL) g_updated++; } + /* Minimal time for next end of time-step */ + ti_end_min = min(p->ti_end, ti_end_min); + ti_end_max = max(p->ti_end, ti_end_max); + /* Now collect quantities for statistics */ const double x[3] = {p->x[0], p->x[1], p->x[2]}; @@ -1270,10 +1274,6 @@ void runner_do_kick(struct runner *r, struct cell *c, int timer) { v_full[2] * v_full[2]); e_pot += 0.f; /* No gravitational potential thus far */ e_int += hydro_get_internal_energy(p); - - /* Minimal time for next end of time-step */ - ti_end_min = min(p->ti_end, ti_end_min); - ti_end_max = max(p->ti_end, ti_end_max); } } -- GitLab