Commit 0d73ea36 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Don't divide by time-step if time-step is zero in the hydro_kick

parent 79c9a0f9
......@@ -377,7 +377,7 @@ __attribute__((always_inline)) INLINE static void hydro_kick_extra(
struct part *restrict p, struct xpart *restrict xp, float dt) {
/* Do not decrease the entropy by more than a factor of 2 */
if (p->entropy_dt < -0.5f * xp->entropy_full / dt) {
if (dt > 0. && p->entropy_dt * dt < -0.5f * xp->entropy_full) {
/* message("Warning! Limiting entropy_dt. Possible cooling error.\n
* entropy_full = %g \n entropy_dt * dt =%g \n", */
/* xp->entropy_full,p->entropy_dt * dt); */
......
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