diff --git a/src/cooling/Compton/cooling.h b/src/cooling/Compton/cooling.h index ddc0f28be1a4bc6bddf30d7489ad280e3840f374..db4369884ba14d16cbb8ea08dd1cfb7377c804c0 100644 --- a/src/cooling/Compton/cooling.h +++ b/src/cooling/Compton/cooling.h @@ -178,7 +178,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part( * this step 1/2 kick + another 1/2 kick that could potentially be for * a time-step twice as big. We hence check for 1.5 delta_t. */ if (u_old + total_du_dt * 1.5 * dt_therm < u_limit) { - total_du_dt = (u_floor - u_old) / (1.5f * dt_therm); + total_du_dt = (u_limit - u_old) / (1.5f * dt_therm); } /* Second, check whether the energy used in the prediction could get negative. diff --git a/src/cooling/const_lambda/cooling.h b/src/cooling/const_lambda/cooling.h index d11a3780c0dd042a79c73b996315b492d255f6a0..974b055b1f8942f53b72e6ccf17389d8f85b666e 100644 --- a/src/cooling/const_lambda/cooling.h +++ b/src/cooling/const_lambda/cooling.h @@ -156,7 +156,7 @@ __attribute__((always_inline)) INLINE static void cooling_cool_part( * this step 1/2 kick + another 1/2 kick that could potentially be for * a time-step twice as big. We hence check for 1.5 delta_t. */ if (u_old + total_du_dt * 1.5 * dt_therm < u_limit) { - total_du_dt = (u_floor - u_old) / (1.5f * dt_therm); + total_du_dt = (u_limit - u_old) / (1.5f * dt_therm); } /* Second, check whether the energy used in the prediction could get negative.