Commit 4eee46dc authored by fonotec's avatar fonotec

Update fof code to work for stars + black holes

parent 4e5ebe2f
......@@ -154,8 +154,8 @@ void fof_init(struct fof_props *props, struct swift_params *params,
int with_gas_fof = 0;
int with_dm_fof = 1;
int with_dm_background_fof = 0;
int with_stars_fof = 0;
int with_black_hole_fof = 0;
int with_stars_fof = 1;
int with_black_hole_fof = 1;
/* Initialize the fof mode */
current_fof_policy = 0;
......@@ -849,6 +849,9 @@ void fof_search_self_cell(const struct fof_props *props, const double l_x2,
/* Ignore inhibited particles */
if (pj->time_bin >= time_bin_inhibited) continue;
/* Check if the particle if the particle is in the fof policy */
if (!(current_fof_policy & (1<<pj->type))) continue;
#ifdef SWIFT_DEBUG_CHECKS
if (pj->ti_drift != ti_current)
error("Running FOF on an un-drifted particle!");
......@@ -941,7 +944,7 @@ void fof_search_pair_cells(const struct fof_props *props, const double dim[3],
/* Ignore inhibited particles */
if (pi->time_bin >= time_bin_inhibited) continue;
/* Ignore particles not being a star */
/* Ignore particles of the incorrect particle type */
if (!(current_fof_policy & (1<<pi->type))) continue;
#ifdef SWIFT_DEBUG_CHECKS
......@@ -963,6 +966,9 @@ void fof_search_pair_cells(const struct fof_props *props, const double dim[3],
/* Ignore inhibited particles */
if (pj->time_bin >= time_bin_inhibited) continue;
/* Ignore particles of the incorrect particle type */
if (!(current_fof_policy & (1<<pj->type))) continue;
#ifdef SWIFT_DEBUG_CHECKS
if (pj->ti_drift != ti_current)
error("Running FOF on an un-drifted particle!");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment