From b2778ab4af3ec7b7ac806fec02f308aa5f1b5f60 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Fri, 18 Dec 2020 21:32:02 +0100 Subject: [PATCH] Code formatting --- src/black_holes/EAGLE/black_holes_iact.h | 11 +++++------ src/black_holes/EAGLE/black_holes_properties.h | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/black_holes/EAGLE/black_holes_iact.h b/src/black_holes/EAGLE/black_holes_iact.h index d248dd9156..279123e2f7 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 551df0a96c..429a96aca6 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) * -- GitLab