diff --git a/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/isolated_galaxy.yml b/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/isolated_galaxy.yml index e4bea67340450476cbc0bf6eb5621a9655724a5b..1bf7689b995074e53109627d84a837980a95bcc7 100644 --- a/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/isolated_galaxy.yml +++ b/examples/IsolatedGalaxy/IsolatedGalaxy_starformation/isolated_galaxy.yml @@ -35,7 +35,7 @@ Statistics: # Parameters related to the initial conditions InitialConditions: - file_name: lowres8.hdf5 # The file to read + file_name: fid.hdf5 # The file to read periodic: 0 # Are we running with periodic ICs? stars_smoothing_length: 0.5 diff --git a/src/runner.c b/src/runner.c index 1095e0cb86238414516b1e4feacdfad3d58d88e8..65a6705966e5b1a6d4396987334845a077223fd6 100644 --- a/src/runner.c +++ b/src/runner.c @@ -133,6 +133,7 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) { struct spart *restrict sparts = c->stars.parts; const struct engine *e = r->e; + const int with_cosmology = (e->policy & engine_policy_cosmology); const struct cosmology *cosmo = e->cosmology; const float stars_h_max = e->hydro_properties->h_max; const float stars_h_min = e->hydro_properties->h_min; @@ -193,11 +194,11 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) { if (with_cosmology) { const integertime_t ti_step = get_integer_timestep(sp->time_bin); const integertime_t ti_begin = - get_integer_time_begin(ti_current - 1, sp->time_bin); + get_integer_time_begin(e->ti_current - 1, sp->time_bin); dt = cosmology_get_therm_kick_factor(e->cosmology, ti_begin, ti_begin + ti_step); } else { - dt = get_timestep(sp->time_bin, time_base); + dt = get_timestep(sp->time_bin, e->time_base); } #ifdef SWIFT_DEBUG_CHECKS diff --git a/src/stars/EAGLE/stars.h b/src/stars/EAGLE/stars.h index 19f6ca75bffd1c61184bbd728fe0a316fe195bec..94910f28ea343b4eeae5c9800ad6b1058b1219e0 100644 --- a/src/stars/EAGLE/stars.h +++ b/src/stars/EAGLE/stars.h @@ -98,27 +98,6 @@ __attribute__((always_inline)) INLINE static void stars_predict_extra( /* sp->h *= expf(w1); */ } -/** - * @brief Predict additional particle fields forward in time when drifting - * - * @param p The particle - * @param dt_drift The drift time-step for positions. - */ -__attribute__((always_inline)) INLINE static void stars_predict_extra( - struct spart *restrict sp, float dt_drift) { - - // Matthieu has it commented out in 646a0f54f6d56e5226b4275f224c1e6e8eb94e78 - //const float h_inv = 1.f / sp->h; - - ///* Predict smoothing length */ - //const float w1 = sp->feedback.h_dt * h_inv * dt_drift; - //if (fabsf(w1) < 0.2f) - // sp->h *= approx_expf(w1); /* 4th order expansion of exp(w) */ - //else - // sp->h *= expf(w1); - -} - /** * @brief Sets the values to be predicted in the drifts to their values at a * kick time