diff --git a/src/black_holes/EAGLE/black_holes.h b/src/black_holes/EAGLE/black_holes.h index 318e828e398602bf41d77dbf7371c343274c830d..c94f8bb0d8bfa687809c9842d28ab28bc9a10781 100644 --- a/src/black_holes/EAGLE/black_holes.h +++ b/src/black_holes/EAGLE/black_holes.h @@ -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); } /** diff --git a/src/black_holes/EAGLE/black_holes_iact.h b/src/black_holes/EAGLE/black_holes_iact.h index 19a9097605f6053777f1db7b581ab373c0658d83..1cf60a80d00490afd67d0363d50f3c54edc4128c 100644 --- a/src/black_holes/EAGLE/black_holes_iact.h +++ b/src/black_holes/EAGLE/black_holes_iact.h @@ -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);