diff --git a/src/black_holes/EAGLE/black_holes_iact.h b/src/black_holes/EAGLE/black_holes_iact.h index d248dd9156d1d12a94cfbc510e3617c4d765eb62..279123e2f705fa63428f8a106f31b8d9cf80f8c5 100644 --- a/src/black_holes/EAGLE/black_holes_iact.h +++ b/src/black_holes/EAGLE/black_holes_iact.h @@ -21,6 +21,8 @@ /* Local includes */ #include "black_holes_parameters.h" +#include "entropy_floor.h" +#include "equation_of_state.h" #include "gravity.h" #include "hydro.h" #include "random.h" @@ -28,8 +30,6 @@ #include "space.h" #include "timestep_sync_part.h" #include "tracers.h" -#include "equation_of_state.h" -#include "entropy_floor.h" /** * @brief Density interaction between two particles (non-symmetric). @@ -56,8 +56,7 @@ runner_iact_nonsym_bh_gas_density( const struct gravity_props *grav_props, const struct black_holes_props *bh_props, const struct entropy_floor_properties *floor_props, - const integertime_t ti_current, - const double time) { + const integertime_t ti_current, const double time) { float wi, wi_dx; @@ -92,8 +91,8 @@ runner_iact_nonsym_bh_gas_density( /* Check whether we are close to the entropy floor. If we are, we * re-calculate the sound speed using the fixed internal energy */ - const float u_EoS = entropy_floor_temperature(pj, cosmo, floor_props) - * bh_props->temp_to_u_factor; + const float u_EoS = entropy_floor_temperature(pj, cosmo, floor_props) * + bh_props->temp_to_u_factor; if (pj->u < u_EoS * bh_props->fixed_T_above_EoS_factor && pj->u > bh_props->fixed_u_for_soundspeed) { /*const float cj_old = cj; */ diff --git a/src/black_holes/EAGLE/black_holes_properties.h b/src/black_holes/EAGLE/black_holes_properties.h index 551df0a96c61911cf3e75d1badad5e3f61ba2b54..429a96aca6ff8b92c4060ec3bc43431e42f41858 100644 --- a/src/black_holes/EAGLE/black_holes_properties.h +++ b/src/black_holes/EAGLE/black_holes_properties.h @@ -24,6 +24,7 @@ /* Local includes. */ #include "chemistry.h" +#include "exp10.h" #include "hydro_properties.h" /* Includes. */ @@ -130,7 +131,6 @@ struct black_holes_props { /*! Fixed T (expressed as internal energy) for sound speed near EoS */ float fixed_u_for_soundspeed; - /* ---- Properties of the feedback model ------- */ /*! AGN feedback model: random, isotropic or minimum distance */ @@ -389,8 +389,8 @@ INLINE static void black_holes_props_init(struct black_holes_props *bp, bp->with_fixed_T_near_EoS = parser_get_param_int(params, "EAGLEAGN:with_fixed_T_near_EoS"); if (bp->with_fixed_T_near_EoS) { - bp->fixed_T_above_EoS_factor = pow(10., - parser_get_param_float(params, "EAGLEAGN:fixed_T_above_EoS_dex")); + bp->fixed_T_above_EoS_factor = + exp10(parser_get_param_float(params, "EAGLEAGN:fixed_T_above_EoS_dex")); bp->fixed_u_for_soundspeed = parser_get_param_float(params, "EAGLEAGN:fixed_T_near_EoS_K") / units_cgs_conversion_factor(us, UNIT_CONV_TEMPERATURE) *