Skip to content
Snippets Groups Projects
Commit acca34de authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Also deduct the nibbled mass from the BH rays

parent 3f9e0dae
No related branches found
No related tags found
1 merge request!1199Isotropic and other feedback modes
......@@ -420,7 +420,7 @@ __attribute__((always_inline)) INLINE static void black_holes_swallow_part(
bp->ngb_mass -= gas_mass;
/* The ray(s) should not point to the no-longer existing particle */
ray_reset_part_id(bp->rays, colibre_blackhole_number_of_rays, p->id);
ray_reset_part_id(bp->rays, eagle_blackhole_number_of_rays, p->id);
}
/**
......
......@@ -371,6 +371,11 @@ runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
excess_fraction;
}
/* Correct for nibbling the particle mass that is stored in rays */
for (int i = 0; i < eagle_blackhole_number_of_rays; i++) {
if (bi->rays[i].id_min_length == pj->id) bi->rays[i].mass = new_gas_mass;
}
/* Transfer (dynamical) mass from the gas particle to the BH */
bi->mass += nibble_mass;
hydro_set_mass(pj, new_gas_mass);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment