Commit 66de389e authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Added function stubs to update the BH properties in a merger event.

parent 844eea4b
......@@ -156,6 +156,20 @@ __attribute__((always_inline)) INLINE static void black_holes_swallow_part(
/* Nothing to do here: No swallowing in the default model */
}
/**
* @brief Update the properties of a black hole particles by swallowing
* a BH particle.
*
* @param bpi The #bpart to update.
* @param bpj The #bpart that is swallowed.
* @param cosmo The current cosmological model.
*/
__attribute__((always_inline)) INLINE static void black_holes_swallow_bpart(
struct bpart* bpi, const struct bpart* bpj, const struct cosmology* cosmo) {
/* Nothing to do here: No merging in the default model */
}
/**
* @brief Compute the accretion rate of the black hole and all the quantites
* required for the feedback loop.
......
......@@ -234,6 +234,18 @@ __attribute__((always_inline)) INLINE static void black_holes_swallow_part(
bp->ngb_mass -= gas_mass;
}
/**
* @brief Update the properties of a black hole particles by swallowing
* a BH particle.
*
* @param bpi The #bpart to update.
* @param bpj The #bpart that is swallowed.
* @param cosmo The current cosmological model.
*/
__attribute__((always_inline)) INLINE static void black_holes_swallow_bpart(
struct bpart* bpi, const struct bpart* bpj, const struct cosmology* cosmo) {
}
/**
* @brief Compute the accretion rate of the black hole and all the quantites
* required for the feedback loop.
......
......@@ -4031,7 +4031,7 @@ void runner_do_bh_swallow(struct runner *r, struct cell *c, int timer) {
lock_lock(&s->lock);
/* Swallow the gas particle (i.e. update the BH properties) */
// black_holes_swallow_part(bp, p, xp, e->cosmology);
black_holes_swallow_bpart(bp, cell_bp, e->cosmology);
/* Release the space as we are done updating the bpart */
if (lock_unlock(&s->lock) != 0)
......@@ -4061,9 +4061,9 @@ void runner_do_bh_swallow(struct runner *r, struct cell *c, int timer) {
#ifdef WITH_MPI
/* We could also be in the case of a local gas particle being
/* We could also be in the case of a local BH particle being
* swallowed by a foreign BH. In this case, we won't update the
* BH but just remove the particle from the local list. */
* foreign BH but just remove the particle from the local list. */
if (c->nodeID == e->nodeID && !found) {
/* Let's look for the foreign hungry black hole */
......
Supports Markdown
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