Commit 45bfc03c authored by Josh Borrow's avatar Josh Borrow
Browse files

Added minimal internal energy limit to kick_extra for PU scheme

parent 070e45aa
......@@ -593,6 +593,14 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
}
xp->u_full += p->u_dt * dt_therm;
/* Apply the minimal energy limit */
const float min_energy =
hydro_props->minimal_internal_energy / cosmo->a_factor_internal_energy;
if (xp->u_full < min_energy) {
xp->u_full = min_energy;
p->u_dt = 0.f;
}
/* Compute the sound speed */
const float soundspeed = hydro_get_comoving_soundspeed(p);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment