diff --git a/src/engine.c b/src/engine.c index 9bae8120d17c28b5ee146426e5e18516cf25c597..fd62ed4d4340bd6ce0c5fdfbdad9e085f385beca 100644 --- a/src/engine.c +++ b/src/engine.c @@ -2078,6 +2078,16 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs, stars_exact_density_check(e->s, e, /*rel_tol=*/1e-3); #endif +#ifdef SWIFT_BLACK_HOLES_DENSITY_CHECKS + /* Run the brute-force black holes calculation for some parts */ + if (e->policy & engine_policy_black_holes) + black_holes_exact_density_compute(e->s, e); + + /* Check the accuracy of the black holes calculation */ + if (e->policy & engine_policy_black_holes) + black_holes_exact_density_check(e->s, e, /*rel_tol=*/1e-3); +#endif + #ifdef SWIFT_GRAVITY_FORCE_CHECKS /* Check the accuracy of the gravity calculation */ if (e->policy & engine_policy_self_gravity) @@ -2611,6 +2621,16 @@ int engine_step(struct engine *e) { stars_exact_density_check(e->s, e, /*rel_tol=*/1e-2); #endif +#ifdef SWIFT_BLACK_HOLES_DENSITY_CHECKS + /* Run the brute-force black holes calculation for some parts */ + if (e->policy & engine_policy_black_holes) + black_holes_exact_density_compute(e->s, e); + + /* Check the accuracy of the black holes calculation */ + if (e->policy & engine_policy_black_holes) + black_holes_exact_density_check(e->s, e, /*rel_tol=*/1e-3); +#endif + #ifdef SWIFT_GRAVITY_FORCE_CHECKS /* Check if we want to run force checks this timestep. */ if (e->policy & engine_policy_self_gravity) {