Commit 209dc39d authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'black_holes_repositioning' into 'master'

Black holes repositioning

See merge request !876
parents a72aaa2e ec1dcaf1
......@@ -1400,6 +1400,12 @@ AC_ARG_WITH([gravity],
[with_gravity="default"]
)
if test "$with_subgrid" = "EAGLE"; then
if test "$with_gravity" = "default"; then
with_gravity="with-potential"
fi
fi
case "$with_gravity" in
with-potential)
AC_DEFINE([POTENTIAL_GRAVITY], [1], [Gravity scheme with potential calculation])
......@@ -1961,6 +1967,13 @@ AC_DEFINE_UNQUOTED([SELF_GRAVITY_MULTIPOLE_ORDER], [$with_multipole_order], [Mul
AC_PATH_PROG([GIT_CMD], [git])
AC_SUBST([GIT_CMD])
# Check that the gravity model is compatible with the subgrid
if test $with_black_holes = "EAGLE"; then
if test $with_gravity != "with-potential"; then
AC_MSG_ERROR([The EAGLE BH model needs the gravity scheme to provide potentials. The code must be compile with --with-gravity=with-potential.])
fi
fi
# Make the documentation. Add conditional to handle disable option.
DX_INIT_DOXYGEN(libswift,doc/Doxyfile,doc/)
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$ac_cv_path_ac_pt_DX_DOXYGEN" != ""])
......
......@@ -577,6 +577,11 @@ Black-hole creation
Black-hole accretion
~~~~~~~~~~~~~~~~~~~~
.. _EAGLE_black_hole_reposition:
Black-hole repositioning
~~~~~~~~~~~~~~~~~~~~~~~~
.. _EAGLE_black_hole_feedback:
AGN feedback
......
......@@ -170,3 +170,4 @@ EAGLEAGN:
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
\ No newline at end of file
......@@ -171,3 +171,4 @@ EAGLEAGN:
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
\ No newline at end of file
......@@ -171,5 +171,4 @@ EAGLEAGN:
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
......@@ -162,3 +162,4 @@ EAGLEAGN:
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
\ No newline at end of file
......@@ -169,3 +169,4 @@ EAGLEAGN:
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
\ No newline at end of file
......@@ -161,3 +161,4 @@ EAGLEAGN:
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
\ No newline at end of file
......@@ -171,3 +171,4 @@ EAGLEAGN:
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
\ No newline at end of file
......@@ -408,4 +408,4 @@ EAGLEAGN:
coupling_efficiency: 0.15 # Fraction of the radiated energy that couples to the gas in feedback events.
AGN_delta_T_K: 3.16228e8 # Change in temperature to apply to the gas particle in an AGN feedback event in Kelvin.
AGN_num_ngb_to_heat: 1. # Target number of gas neighbours to heat in an AGN feedback event.
max_reposition_mass: 2e8 # Maximal BH mass considered for BH repositioning in solar masses.
......@@ -187,6 +187,20 @@ __attribute__((always_inline)) INLINE static void black_holes_prepare_feedback(
const struct phys_const* constants, const struct cosmology* cosmo,
const double dt) {}
/**
* @brief Finish the calculation of the new BH position.
*
* Nothing to do here.
*
* @param bp The black hole particle.
* @param props The properties of the black hole scheme.
* @param constants The physical constants (in internal units).
* @param cosmo The cosmological model.
*/
__attribute__((always_inline)) INLINE static void black_holes_end_reposition(
struct bpart* restrict bp, const struct black_holes_props* props,
const struct phys_const* constants, const struct cosmology* cosmo) {}
/**
* @brief Reset acceleration fields of a particle
*
......
......@@ -30,16 +30,15 @@
* @param pj Second particle (gas, not updated).
* @param xpj The extended data of the second particle (not updated).
* @param cosmo The cosmological model.
* @param grav_props The properties of the gravity scheme (softening, G, ...).
* @param ti_current Current integer time value (for random numbers).
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_gas_density(const float r2, const float *dx,
const float hi, const float hj,
struct bpart *restrict bi,
const struct part *restrict pj,
const struct xpart *restrict xpj,
const struct cosmology *cosmo,
const integertime_t ti_current) {
runner_iact_nonsym_bh_gas_density(
const float r2, const float *dx, const float hi, const float hj,
struct bpart *restrict bi, const struct part *restrict pj,
const struct xpart *restrict xpj, const struct cosmology *cosmo,
const struct gravity_props *grav_props, const integertime_t ti_current) {
float wi, wi_dx;
......@@ -80,16 +79,15 @@ runner_iact_nonsym_bh_gas_density(const float r2, const float *dx,
* @param pj Second particle (gas)
* @param xpj The extended data of the second particle.
* @param cosmo The cosmological model.
* @param grav_props The properties of the gravity scheme (softening, G, ...).
* @param ti_current Current integer time value (for random numbers).
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
const float hi, const float hj,
const struct bpart *restrict bi,
struct part *restrict pj,
struct xpart *restrict xpj,
const struct cosmology *cosmo,
const integertime_t ti_current) {}
runner_iact_nonsym_bh_gas_swallow(
const float r2, const float *dx, const float hi, const float hj,
const struct bpart *restrict bi, struct part *restrict pj,
struct xpart *restrict xpj, const struct cosmology *cosmo,
const struct gravity_props *grav_props, const integertime_t ti_current) {}
/**
* @brief Swallowing interaction between two BH particles (non-symmetric).
......@@ -104,7 +102,7 @@ runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
* @param bi First particle (black hole).
* @param bj Second particle (black hole)
* @param cosmo The cosmological model.
* @param grav_props The properties of the gravity scheme (softening, G, ...)
* @param grav_props The properties of the gravity scheme (softening, G, ...).
* @param ti_current Current integer time value (for random numbers).
*/
__attribute__((always_inline)) INLINE static void
......@@ -127,16 +125,15 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
* @param pj Second particle (gas)
* @param xpj The extended data of the second particle.
* @param cosmo The cosmological model.
* @param grav_props The properties of the gravity scheme (softening, G, ...).
* @param ti_current Current integer time value (for random numbers).
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_gas_feedback(const float r2, const float *dx,
const float hi, const float hj,
struct bpart *restrict bi,
struct part *restrict pj,
struct xpart *restrict xpj,
const struct cosmology *cosmo,
const integertime_t ti_current) {
runner_iact_nonsym_bh_gas_feedback(
const float r2, const float *dx, const float hi, const float hj,
struct bpart *restrict bi, struct part *restrict pj,
struct xpart *restrict xpj, const struct cosmology *cosmo,
const struct gravity_props *grav_props, const integertime_t ti_current) {
#ifdef DEBUG_INTERACTIONS_BH
/* Update ngb counters */
if (si->num_ngb_force < MAX_NUM_OF_NEIGHBOURS_BH)
......
......@@ -102,6 +102,7 @@ INLINE static void convert_bpart_vel(const struct engine* e,
* @param bparts The b-particle array.
* @param list The list of i/o properties to write.
* @param num_fields The number of i/o fields to write.
* @param with_cosmology Are we running a cosmological simulation?
*/
INLINE static void black_holes_write_particles(const struct bpart* bparts,
struct io_props* list,
......
......@@ -24,6 +24,7 @@
#include "black_holes_struct.h"
#include "cosmology.h"
#include "dimension.h"
#include "gravity.h"
#include "kernel_hydro.h"
#include "minmax.h"
#include "physical_constants.h"
......@@ -89,16 +90,43 @@ __attribute__((always_inline)) INLINE static void black_holes_init_bpart(
bp->circular_velocity_gas[2] = 0.f;
bp->ngb_mass = 0.f;
bp->num_ngbs = 0;
bp->reposition.x[0] = -FLT_MAX;
bp->reposition.x[1] = -FLT_MAX;
bp->reposition.x[2] = -FLT_MAX;
bp->reposition.min_potential = FLT_MAX;
}
/**
* @brief Predict additional particle fields forward in time when drifting
*
* The fields do not get predicted but we move the BH to its new position
* if a new one was calculated in the repositioning loop.
*
* @param bp The particle
* @param dt_drift The drift time-step for positions.
*/
__attribute__((always_inline)) INLINE static void black_holes_predict_extra(
struct bpart* restrict bp, float dt_drift) {}
struct bpart* restrict bp, float dt_drift) {
/* Are we doing some repositioning? */
if (bp->reposition.min_potential != FLT_MAX) {
#ifdef SWIFT_DEBUG_CHECKS
if (bp->reposition.x[0] == -FLT_MAX || bp->reposition.x[1] == -FLT_MAX ||
bp->reposition.x[2] == -FLT_MAX) {
error("Something went wrong with the new repositioning position");
}
#endif
bp->x[0] = bp->reposition.x[0];
bp->x[1] = bp->reposition.x[1];
bp->x[2] = bp->reposition.x[2];
bp->gpart->x[0] = bp->reposition.x[0];
bp->gpart->x[1] = bp->reposition.x[1];
bp->gpart->x[2] = bp->reposition.x[2];
}
}
/**
* @brief Sets the values to be predicted in the drifts to their values at a
......@@ -430,6 +458,35 @@ __attribute__((always_inline)) INLINE static void black_holes_prepare_feedback(
}
}
/**
* @brief Finish the calculation of the new BH position.
*
* Here, we check that the BH should indeed be moved in the next drift.
*
* @param bp The black hole particle.
* @param props The properties of the black hole scheme.
* @param constants The physical constants (in internal units).
* @param cosmo The cosmological model.
*/
__attribute__((always_inline)) INLINE static void black_holes_end_reposition(
struct bpart* restrict bp, const struct black_holes_props* props,
const struct phys_const* constants, const struct cosmology* cosmo) {
const float potential = gravity_get_comoving_potential(bp->gpart);
/* Is the potential lower (i.e. the BH is at the bottom already)
* OR is the BH massive enough that we don't reposition? */
if (potential < bp->reposition.min_potential ||
bp->subgrid_mass > props->max_reposition_mass) {
/* No need to reposition */
bp->reposition.min_potential = FLT_MAX;
bp->reposition.x[0] = -FLT_MAX;
bp->reposition.x[1] = -FLT_MAX;
bp->reposition.x[2] = -FLT_MAX;
}
}
/**
* @brief Reset acceleration fields of a particle
*
......
......@@ -20,6 +20,7 @@
#define SWIFT_EAGLE_BH_IACT_H
/* Local includes */
#include "gravity.h"
#include "hydro.h"
#include "random.h"
#include "space.h"
......@@ -35,16 +36,15 @@
* @param pj Second particle (gas, not updated).
* @param xpj The extended data of the second particle (not updated).
* @param cosmo The cosmological model.
* @param grav_props The properties of the gravity scheme (softening, G, ...).
* @param ti_current Current integer time value (for random numbers).
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_gas_density(const float r2, const float *dx,
const float hi, const float hj,
struct bpart *restrict bi,
const struct part *restrict pj,
const struct xpart *restrict xpj,
const struct cosmology *cosmo,
const integertime_t ti_current) {
runner_iact_nonsym_bh_gas_density(
const float r2, const float *dx, const float hi, const float hj,
struct bpart *restrict bi, const struct part *restrict pj,
const struct xpart *restrict xpj, const struct cosmology *cosmo,
const struct gravity_props *grav_props, const integertime_t ti_current) {
float wi, wi_dx;
......@@ -117,16 +117,15 @@ runner_iact_nonsym_bh_gas_density(const float r2, const float *dx,
* @param pj Second particle (gas)
* @param xpj The extended data of the second particle.
* @param cosmo The cosmological model.
* @param grav_props The properties of the gravity scheme (softening, G, ...).
* @param ti_current Current integer time value (for random numbers).
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
const float hi, const float hj,
const struct bpart *restrict bi,
struct part *restrict pj,
struct xpart *restrict xpj,
const struct cosmology *cosmo,
const integertime_t ti_current) {
runner_iact_nonsym_bh_gas_swallow(
const float r2, const float *dx, const float hi, const float hj,
struct bpart *restrict bi, struct part *restrict pj,
struct xpart *restrict xpj, const struct cosmology *cosmo,
const struct gravity_props *grav_props, const integertime_t ti_current) {
float wi;
......@@ -140,6 +139,44 @@ runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
const float ui = r * hi_inv;
kernel_eval(ui, &wi);
/* Start by checking the repositioning criteria */
/* Note the factor 9 is taken from EAGLE. Will be turned into a parameter */
const float max_dist_repos2 =
kernel_gravity_softening_plummer_equivalent_inv *
kernel_gravity_softening_plummer_equivalent_inv * 9.f *
grav_props->epsilon_cur2;
/* This gas neighbour is close enough that we can consider it's potential
for repositioning */
if (r2 < max_dist_repos2) {
/* Compute relative peculiar velocity between the two BHs
* Recall that in SWIFT v is (v_pec * a) */
const float delta_v[3] = {bi->v[0] - pj->v[0], bi->v[1] - pj->v[1],
bi->v[2] - pj->v[2]};
const float v2 = delta_v[0] * delta_v[0] + delta_v[1] * delta_v[1] +
delta_v[2] * delta_v[2];
const float v2_pec = v2 * cosmo->a2_inv;
/* Check the velocity criterion */
if (v2_pec < 0.25f * bi->sound_speed_gas * bi->sound_speed_gas) {
const float potential = gravity_get_comoving_potential(pj->gpart);
/* Is the potential lower? */
if (potential < bi->reposition.min_potential) {
/* Store this as our new best */
bi->reposition.min_potential = potential;
bi->reposition.x[0] = pj->x[0];
bi->reposition.x[1] = pj->x[1];
bi->reposition.x[2] = pj->x[2];
}
}
}
/* Is the BH hungry? */
if (bi->subgrid_mass > bi->mass) {
......@@ -188,13 +225,13 @@ runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
* @param bi First particle (black hole).
* @param bj Second particle (black hole)
* @param cosmo The cosmological model.
* @param grav_props The properties of the gravity scheme (softening, G, ...)
* @param grav_props The properties of the gravity scheme (softening, G, ...).
* @param ti_current Current integer time value (for random numbers).
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
const float hi, const float hj,
const struct bpart *restrict bi,
struct bpart *restrict bi,
struct bpart *restrict bj,
const struct cosmology *cosmo,
const struct gravity_props *grav_props,
......@@ -209,6 +246,33 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
const float v2_pec = v2 * cosmo->a2_inv;
/* Note the factor 9 is taken from EAGLE. Will be turned into a parameter */
const float max_dist_repos2 =
kernel_gravity_softening_plummer_equivalent_inv *
kernel_gravity_softening_plummer_equivalent_inv * 9.f *
grav_props->epsilon_cur2;
/* This gas neighbour is close enough that we can consider it's potential
for repositioning */
if (r2 < max_dist_repos2) {
/* Check the velocity criterion */
if (v2_pec < 0.25f * bi->sound_speed_gas * bi->sound_speed_gas) {
const float potential = gravity_get_comoving_potential(bj->gpart);
/* Is the potential lower? */
if (potential < bi->reposition.min_potential) {
/* Store this as our new best */
bi->reposition.min_potential = potential;
bi->reposition.x[0] = bj->x[0];
bi->reposition.x[1] = bj->x[1];
bi->reposition.x[2] = bj->x[2];
}
}
}
/* Find the most massive of the two BHs */
float M = bi->subgrid_mass;
float h = hi;
......@@ -218,9 +282,10 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
}
/* Note the factor 9 is taken from EAGLE. Will be turned into a parameter */
const float max_distance2 = kernel_gravity_softening_plummer_equivalent_inv *
kernel_gravity_softening_plummer_equivalent_inv *
9.f * grav_props->epsilon_cur2;
const float max_dist_merge2 =
kernel_gravity_softening_plummer_equivalent_inv *
kernel_gravity_softening_plummer_equivalent_inv * 9.f *
grav_props->epsilon_cur2;
const float G_Newton = grav_props->G_Newton;
......@@ -234,7 +299,7 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
/* Merge if gravitationally bound AND if within max distance
* Note that we use the kernel support here as the size and not just the
* smoothing length */
if (v2_pec < G_Newton * M / (kernel_gamma * h) && (r2 < max_distance2)) {
if (v2_pec < G_Newton * M / (kernel_gamma * h) && (r2 < max_dist_merge2)) {
/* This particle is swallowed by the BH with the largest ID of all the
* candidates wanting to swallow it */
......@@ -269,16 +334,15 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
* @param pj Second particle (gas)
* @param xpj The extended data of the second particle.
* @param cosmo The cosmological model.
* @param grav_props The properties of the gravity scheme (softening, G, ...).
* @param ti_current Current integer time value (for random numbers).
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_gas_feedback(const float r2, const float *dx,
const float hi, const float hj,
const struct bpart *restrict bi,
struct part *restrict pj,
struct xpart *restrict xpj,
const struct cosmology *cosmo,
const integertime_t ti_current) {
runner_iact_nonsym_bh_gas_feedback(
const float r2, const float *dx, const float hi, const float hj,
const struct bpart *restrict bi, struct part *restrict pj,
struct xpart *restrict xpj, const struct cosmology *cosmo,
const struct gravity_props *grav_props, const integertime_t ti_current) {
/* Get the heating probability */
const float prob = bi->to_distribute.AGN_heating_probability;
......
......@@ -104,6 +104,7 @@ INLINE static void convert_bpart_vel(const struct engine* e,
* @param bparts The b-particle array.
* @param list The list of i/o properties to write.
* @param num_fields The number of i/o fields to write.
* @param with_cosmology Are we running a cosmological simulation?
*/
INLINE static void black_holes_write_particles(const struct bpart* bparts,
struct io_props* list,
......
......@@ -121,6 +121,16 @@ struct bpart {
} to_distribute;
struct {
/*! Value of the minimum potential across all neighbours. */
float min_potential;
/*! New position of the BH following the reposition procedure */
double x[3];
} reposition;
/*! Chemistry information (e.g. metal content at birth, swallowed metal
* content, etc.) */
struct chemistry_bpart_data chemistry_data;
......
......@@ -74,6 +74,11 @@ struct black_holes_props {
/*! Number of gas neighbours to heat in a feedback event */
float num_ngbs_to_heat;
/* ---- Properties of the repositioning model --- */
/*! Maximal mass of BH to reposition */
float max_reposition_mass;
/* ---- Common conversion factors --------------- */
/*! Conversion factor from temperature to internal energy */
......@@ -157,6 +162,14 @@ INLINE static void black_holes_props_init(struct black_holes_props *bp,
bp->num_ngbs_to_heat =
parser_get_param_float(params, "EAGLEAGN:AGN_num_ngb_to_heat");
/* Reposition parameters --------------------------------- */
bp->max_reposition_mass =
parser_get_param_float(params, "EAGLEAGN:max_reposition_mass");
/* Convert to internal units */
bp->max_reposition_mass *= phys_const->const_solar_mass;
/* Common conversion factors ----------------------------- */
/* Calculate temperature to internal energy conversion factor (all internal
......
......@@ -905,6 +905,10 @@ void runner_do_black_holes_swallow_ghost(struct runner *r, struct cell *c,
if (bpart_is_active(bp, e)) {
/* Compute the final operations for repositioning of this BH */
black_holes_end_reposition(bp, e->black_holes_properties,
e->physical_constants, e->cosmology);
/* Get particle time-step */
double dt;
if (with_cosmology) {
......
......@@ -159,7 +159,8 @@ void DOSELF1_BH(struct runner *r, struct cell *c, int timer) {
#endif
if (r2 < hig2) {
IACT_BH_GAS(r2, dx, hi, hj, bi, pj, xpj, cosmo, ti_current);
IACT_BH_GAS(r2, dx, hi, hj, bi, pj, xpj, cosmo, e->gravity_properties,
ti_current);
}
} /* loop over the parts in ci. */
} /* loop over the bparts in ci. */
......@@ -310,7 +311,8 @@ void DO_NONSYM_PAIR1_BH_NAIVE(struct runner *r, struct cell *restrict ci,
#endif
if (r2 < hig2) {
IACT_BH_GAS(r2, dx, hi, hj, bi, pj, xpj, cosmo, ti_current);
IACT_BH_GAS(r2, dx, hi, hj, bi, pj, xpj, cosmo, e->gravity_properties,
ti_current);
}
} /* loop over the parts in cj. */
} /* loop over the bparts in ci. */
......@@ -475,7 +477,8 @@ void DOPAIR1_SUBSET_BH_NAIVE(struct runner *r, struct cell *restrict ci,
#endif
/* Hit or miss? */
if (r2 < hig2) {
IACT_BH_GAS(r2, dx, hi, hj, bi, pj, xpj, cosmo, ti_current);
IACT_BH_GAS(r2, dx, hi, hj, bi, pj, xpj, cosmo, e->gravity_properties,
ti_current);
}
} /* loop over the parts in cj. */
} /* loop over the parts in ci. */
......@@ -550,7 +553,8 @@ void DOSELF1_SUBSET_BH(struct runner *r, struct cell *restrict ci,
/* Hit or miss? */
if (r2 < hig2) {
IACT_BH_GAS(r2, dx, hi, pj->h, bi, pj, xpj, cosmo, ti_current);
IACT_BH_GAS(r2, dx, hi, pj->h, bi, pj, xpj, cosmo,
e->gravity_properties, ti_current);
}
} /* loop over the parts in cj. */
} /* loop over the parts in ci. */
......
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