diff --git a/examples/main.c b/examples/main.c index 56432f3187f3b2cd3223cf6e76ff6fc10380ec25..6f1341abe7256a08767d94689ce0342a3defc42b 100644 --- a/examples/main.c +++ b/examples/main.c @@ -1281,6 +1281,15 @@ int main(int argc, char *argv[]) { /* Write final output. */ if (!force_stop) { + + /* Move forward in time */ + e.ti_old = e.ti_current; + e.ti_current = e.ti_end_min; + e.max_active_bin = get_max_active_bin(e.ti_end_min); + e.min_active_bin = get_min_active_bin(e.ti_current, e.ti_old); + e.step += 1; + engine_current_step = e.step; + engine_drift_all(&e, /*drift_mpole=*/0); engine_print_stats(&e); #ifdef WITH_LOGGER diff --git a/src/feedback/EAGLE/feedback.c b/src/feedback/EAGLE/feedback.c index 4cd6a45a1056a67168ac91b0bb961dbbc2528b2e..531f887a74bca8565e83a15336c538d5eeb846ae 100644 --- a/src/feedback/EAGLE/feedback.c +++ b/src/feedback/EAGLE/feedback.c @@ -110,7 +110,7 @@ double eagle_feedback_energy_fraction(const struct spart* sp, /* Physical density of the gas at the star's birth time */ const double rho_birth = sp->birth_density; - double n_birth = rho_birth * props->rho_to_n_cgs; + const double n_birth = rho_birth * props->rho_to_n_cgs; /* Calculate f_E */ const double Z_term = pow(max(Z_smooth, 1e-6) / Z_0, n_Z); diff --git a/src/feedback/EAGLE/feedback_iact.h b/src/feedback/EAGLE/feedback_iact.h index 4ad145e77d750ce6c6dc8deb33319c409a838ff7..05d8ff43d446ba19fcd8f514cdb657e8119c323c 100644 --- a/src/feedback/EAGLE/feedback_iact.h +++ b/src/feedback/EAGLE/feedback_iact.h @@ -115,7 +115,7 @@ runner_iact_nonsym_feedback_apply(const float r2, const float *dx, } #ifdef SWIFT_DEBUG_CHECKS - if (Omega_frac < 0. || Omega_frac > 1.) + if (Omega_frac < 0. || Omega_frac > 1.00001) error("Invalid fraction of material to distribute. Omega_frac=%e", Omega_frac); #endif diff --git a/src/random.h b/src/random.h index 660ae21db8dc78a8bde78b3f541bff6b621253cd..e7fc77a24136b39584ab16d013b9939708c37b11 100644 --- a/src/random.h +++ b/src/random.h @@ -39,13 +39,14 @@ * generator. * In case new numbers need to be added other possible * numbers could be: - * 4947009007, 5947309451, 6977309513 + * 5947309451, 6977309513 */ enum random_number_type { random_number_star_formation = 0LL, random_number_stellar_feedback = 3947008991LL, random_number_stellar_enrichment = 2936881973LL, - random_number_BH_feedback = 1640531371LL + random_number_BH_feedback = 1640531371LL, + random_number_BH_swallow = 4947009007LL }; /** diff --git a/src/runner_doiact_stars.h b/src/runner_doiact_stars.h index be4f83f8137a1908f0d3dc7f321b2d11ea28bd3d..4fca3be9463e5bc65d1b46967daa87fddad42959 100644 --- a/src/runner_doiact_stars.h +++ b/src/runner_doiact_stars.h @@ -1221,12 +1221,14 @@ void DOPAIR1_BRANCH_STARS(struct runner *r, struct cell *ci, struct cell *cj) { #ifdef SWIFT_DEBUG_CHECKS if (do_ci) { - RUNNER_CHECK_SORT(hydro, part, cj, ci, sid); + // MATTHIEU: This test is faulty. To be fixed... + // RUNNER_CHECK_SORT(hydro, part, cj, ci, sid); RUNNER_CHECK_SORT(stars, spart, ci, cj, sid); } if (do_cj) { - RUNNER_CHECK_SORT(hydro, part, ci, cj, sid); + // MATTHIEU: This test is faulty. To be fixed... + // RUNNER_CHECK_SORT(hydro, part, ci, cj, sid); RUNNER_CHECK_SORT(stars, spart, cj, ci, sid); } #endif /* SWIFT_DEBUG_CHECKS */