Skip to content
Snippets Groups Projects
Commit 46fc6bd5 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Use the correct minimal limit when computing the alternative du/dt derivative...

Use the correct minimal limit when computing the alternative du/dt derivative in the Lambda and Compton coolin models.
parent 8a02052a
Branches
Tags
1 merge request!737Apply the entropy floor in the cooling routine
......@@ -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.
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment