diff --git a/src/hydro/Minimal/hydro.h b/src/hydro/Minimal/hydro.h index 3585fc3c295be2d449adee5425d61c6024fa7caf..f4e3f1a70625430d9bd891c5f7596d71e7b8b231 100644 --- a/src/hydro/Minimal/hydro.h +++ b/src/hydro/Minimal/hydro.h @@ -116,10 +116,11 @@ __attribute__((always_inline)) * * @param p The particle to act upon * @param xp The extended particle data to act upon - * @param time The current time + * @param ti_current The current time (on the timeline) + * @param timeBase The minimal time-step size */ __attribute__((always_inline)) INLINE static void hydro_prepare_force( - struct part* p, struct xpart* xp, float time) { + struct part* p, struct xpart* xp, int ti_current, double timeBase) { p->force.pressure = p->rho * p->u * (const_hydro_gamma - 1.f); } @@ -154,11 +155,12 @@ __attribute__((always_inline)) * * @param p The particle * @param xp The extended data of the particle - * @param t0 The time at the start of the drift - * @param t1 The time at the end of the drift + * @param t0 The time at the start of the drift (on the timeline) + * @param t1 The time at the end of the drift (on the timeline) + * @param timeBase The minimal time-step size */ __attribute__((always_inline)) INLINE static void hydro_predict_extra( - struct part* p, struct xpart* xp, float t0, float t1) { + struct part* p, struct xpart* xp, int t0, int t1, double timeBase) { const float dt = t1 - t0; diff --git a/src/hydro/Minimal/hydro_debug.h b/src/hydro/Minimal/hydro_debug.h index b208d5b867779aaaa204d8783b75681156506fe7..85fdbac0a7893d575e52629600a5407c1bf77fcc 100644 --- a/src/hydro/Minimal/hydro_debug.h +++ b/src/hydro/Minimal/hydro_debug.h @@ -24,10 +24,10 @@ __attribute__((always_inline)) "v=[%.3e,%.3e,%.3e],v_full=[%.3e,%.3e,%.3e] \n a=[%.3e,%.3e,%.3e], " "u_full=%.3e, u=%.3e, du/dt=%.3e v_sig=%.3e, P=%.3e\n" "h=%.3e, dh/dt=%.3e " - "wcount=%d, m=%.3e, dh_drho=%.3e, rho=%.3e, t_begin=%.3e, t_end=%.3e\n", + "wcount=%d, m=%.3e, dh_drho=%.3e, rho=%.3e, t_begin=%d, t_end=%d\n", p->x[0], p->x[1], p->x[2], p->v[0], p->v[1], p->v[2], xp->v_full[0], xp->v_full[1], xp->v_full[2], p->a_hydro[0], p->a_hydro[1], p->a_hydro[2], xp->u_full, p->u, p->u_dt, p->force.v_sig, p->force.pressure, p->h, - p->h_dt, (int)p->density.wcount, p->mass, p->rho_dh, p->rho, p->t_begin, - p->t_end); + p->h_dt, (int)p->density.wcount, p->mass, p->rho_dh, p->rho, p->ti_begin, + p->ti_end); } diff --git a/src/hydro/Minimal/hydro_part.h b/src/hydro/Minimal/hydro_part.h index b89cc249a42032e05bd35498c5c6435f3ebc4f4b..8875e737c6f3c0ab0b7a390b56e9b946c145fc1b 100644 --- a/src/hydro/Minimal/hydro_part.h +++ b/src/hydro/Minimal/hydro_part.h @@ -55,9 +55,9 @@ struct part { float h_dt; /*!< Time derivative of smoothing length */ - float t_begin; /*!< Time at the beginning of time-step. */ + int ti_begin; /*!< Time at the beginning of time-step. */ - float t_end; /*!< Time at the end of time-step. */ + int ti_end; /*!< Time at the end of time-step. */ float u; /*!< Particle internal energy. */