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

Code formatting

parent 00b54df5
Branches
Tags
1 merge request!1261BH sound speed near EoS
......@@ -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; */
......
......@@ -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) *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment