diff --git a/src/engine.c b/src/engine.c index 0a64e014036f5b58653a0ee6e6150198c1a42a24..1caf437df6e66143033acaa7e7c11cfc33e17bf6 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1907,7 +1907,7 @@ void engine_prepare(struct engine *e) { /* Perform FOF search to seed black holes. Only if there is a rebuild coming * and no repartitioing. */ if (e->policy & engine_policy_fof && e->forcerebuild && !e->forcerepart && - e->run_fof) { + e->run_fof && e->fof_properties->seed_black_holes_enabled) { /* Let's start by drifting everybody to the current time */ engine_drift_all(e, /*drift_mpole=*/0); diff --git a/src/fof.c b/src/fof.c index 5baa4cc48f7a608a69aa413772b08c54aca0687f..fdf822147ff28baa466e5e476f1dfb9292ed27ba 100644 --- a/src/fof.c +++ b/src/fof.c @@ -109,6 +109,10 @@ void fof_init(struct fof_props *props, struct swift_params *params, /* Read the minimum group size. */ props->min_group_size = parser_get_param_int(params, "FOF:min_group_size"); + /* Read whether we're doing FoF calls to seed black holes. */ + props->group_id_default = parser_get_param_int( + params, "FOF:seed_black_holes_enabled"); + /* Read the default group ID of particles in groups below the minimum group * size. */ props->group_id_default = parser_get_opt_param_int( diff --git a/src/fof.h b/src/fof.h index 8b54534b1d8836cd0444b01a9d994f63b6ac438b..9465a749a14bf9218fa20b46a63a353d1a49fd9d 100644 --- a/src/fof.h +++ b/src/fof.h @@ -54,6 +54,9 @@ struct fof_mpi { struct fof_props { + /*! Whether we're doing periodic FoF calls to seed black holes. */ + int seed_black_holes_enabled; + /* ----------- Parameters of the FOF search ------- */ /*! The linking length in units of the mean DM inter-particle separation. */