Commit cdd43b53 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Documentation and interface fixes.

parent f31a4aea
......@@ -763,7 +763,6 @@ INPUT = @top_srcdir@ @top_srcdir@/src @top_srcdir@/tests @top_
INPUT += @top_srcdir@/src/hydro/Minimal
INPUT += @top_srcdir@/src/hydro/Gadget2
INPUT += @top_srcdir@/src/gravity/Default
INPUT += @top_srcdir@/src/stars/Default
INPUT += @top_srcdir@/src/riemann
INPUT += @top_srcdir@/src/potential/point_mass
INPUT += @top_srcdir@/src/equation_of_state/ideal_gas
......@@ -776,6 +775,7 @@ INPUT += @top_srcdir@/src/entropy_floor/EAGLE
INPUT += @top_srcdir@/src/star_formation/EAGLE
INPUT += @top_srcdir@/src/tracers/EAGLE
INPUT += @top_srcdir@/src/stars/EAGLE
INPUT += @top_srcdir@/src/feedback/EAGLE
INPUT += @top_srcdir@/src/black_holes/Default
# This tag can be used to specify the character encoding of the source files
......
......@@ -180,12 +180,8 @@ __attribute__((always_inline)) INLINE static void chemistry_first_init_part(
* @brief Sets the chemistry properties of the sparticles to a valid start
* state.
*
* @param phys_const The physical constants in internal units.
* @param us The internal system of units.
* @param cosmo The current cosmological model.
* @param data The global chemistry information.
* @param sp Pointer to the sparticle data.
* @param xp Pointer to the extended particle data.
*/
__attribute__((always_inline)) INLINE static void chemistry_first_init_spart(
const struct chemistry_global_data* data, struct spart* restrict sp) {
......
......@@ -4802,6 +4802,7 @@ void engine_unpin(void) {
* @param entropy_floor The #entropy_floor_properties for this run.
* @param gravity The #gravity_props used for this run.
* @param stars The #stars_props used for this run.
* @param feedback The #feedback_props used for this run.
* @param mesh The #pm_mesh used for the long-range periodic forces.
* @param potential The properties of the external potential.
* @param cooling_func The properties of the cooling function.
......
......@@ -285,8 +285,8 @@ inline static void determine_bin_yield_SNII(
*
* @param log10_min_mass log10 mass at the end of step
* @param log10_max_mass log10 mass at the beginning of step
* @param stars star properties data structure
* @param sp spart we are computing feedback from
* @param props properties of the feedback model
* @param sp #spart we are computing feedback from
* @param star_age_Gyr age of star in Gyr
* @param dt_Gyr timestep dt in Gyr
*/
......@@ -356,25 +356,25 @@ inline static void evolve_SNIa(const float log10_min_mass,
* @param log10_max_mass log10 mass at the beginning of step
* @param stellar_yields array to store calculated yields for passing to
* integrate_imf
* @param stars star properties data structure
* @param props properties of the feedback model.
* @param sp spart we are computing feedback from
*/
inline static void evolve_SNII(
float log10_min_mass, float log10_max_mass, float* stellar_yields,
const struct feedback_props* restrict feedback_props,
struct spart* restrict sp) {
inline static void evolve_SNII(float log10_min_mass, float log10_max_mass,
float* stellar_yields,
const struct feedback_props* props,
struct spart* sp) {
int low_imf_mass_bin_index, high_imf_mass_bin_index, mass_bin_index;
/* If mass at beginning of step is less than tabulated lower bound for IMF,
* limit it.*/
if (log10_min_mass < feedback_props->log10_SNII_min_mass_msun)
log10_min_mass = feedback_props->log10_SNII_min_mass_msun;
if (log10_min_mass < props->log10_SNII_min_mass_msun)
log10_min_mass = props->log10_SNII_min_mass_msun;
/* If mass at end of step is greater than tabulated upper bound for IMF, limit
* it.*/
if (log10_max_mass > feedback_props->log10_SNII_max_mass_msun)
log10_max_mass = feedback_props->log10_SNII_max_mass_msun;
if (log10_max_mass > props->log10_SNII_max_mass_msun)
log10_max_mass = props->log10_SNII_max_mass_msun;
/* Don't do anything if the stellar mass hasn't decreased by the end of the
* step */
......@@ -382,11 +382,12 @@ inline static void evolve_SNII(
/* determine which IMF mass bins contribute to the integral */
determine_imf_bins(log10_min_mass, log10_max_mass, &low_imf_mass_bin_index,
&high_imf_mass_bin_index, feedback_props);
&high_imf_mass_bin_index, props);
/* Integrate IMF to determine number of SNII */
sp->feedback_data.to_distribute.num_SNII = integrate_imf(
log10_min_mass, log10_max_mass, 0, stellar_yields, feedback_props);
sp->feedback_data.to_distribute.num_SNII =
integrate_imf(log10_min_mass, log10_max_mass,
eagle_imf_integration_no_weight, stellar_yields, props);
/* determine which metallicity bin and offset this star belongs to */
int iz_low = 0, iz_high = 0, low_index_3d, high_index_3d, low_index_2d,
......@@ -394,7 +395,7 @@ inline static void evolve_SNII(
float dz = 0.;
determine_bin_yield_SNII(&iz_low, &iz_high, &dz,
log10(sp->chemistry_data.metal_mass_fraction_total),
feedback_props);
props);
/* compute metals produced */
float metal_mass_released[chemistry_element_count], metal_mass_released_total;
......@@ -415,18 +416,17 @@ inline static void evolve_SNII(
eagle_feedback_N_imf_bins);
stellar_yields[mass_bin_index] =
(1 - dz) *
(feedback_props->yield_SNII.yield_IMF_resampled[low_index_3d] +
(props->yield_SNII.yield_IMF_resampled[low_index_3d] +
sp->chemistry_data.metal_mass_fraction[elem] *
feedback_props->yield_SNII
.ejecta_IMF_resampled[low_index_2d]) +
dz * (feedback_props->yield_SNII.yield_IMF_resampled[high_index_3d] +
props->yield_SNII.ejecta_IMF_resampled[low_index_2d]) +
dz * (props->yield_SNII.yield_IMF_resampled[high_index_3d] +
sp->chemistry_data.metal_mass_fraction[elem] *
feedback_props->yield_SNII
.ejecta_IMF_resampled[high_index_2d]);
props->yield_SNII.ejecta_IMF_resampled[high_index_2d]);
}
metal_mass_released[elem] = integrate_imf(log10_min_mass, log10_max_mass, 2,
stellar_yields, feedback_props);
metal_mass_released[elem] = integrate_imf(
log10_min_mass, log10_max_mass, eagle_imf_integration_yield_weight,
stellar_yields, props);
}
/* Compute mass produced */
......@@ -439,20 +439,17 @@ inline static void evolve_SNII(
eagle_feedback_SNII_N_metals,
eagle_feedback_N_imf_bins);
stellar_yields[mass_bin_index] =
(1 - dz) * (feedback_props->yield_SNII
.total_metals_IMF_resampled[low_index_2d] +
(1 - dz) * (props->yield_SNII.total_metals_IMF_resampled[low_index_2d] +
sp->chemistry_data.metal_mass_fraction_total *
feedback_props->yield_SNII
.ejecta_IMF_resampled[low_index_2d]) +
dz * (feedback_props->yield_SNII
.total_metals_IMF_resampled[high_index_2d] +
props->yield_SNII.ejecta_IMF_resampled[low_index_2d]) +
dz * (props->yield_SNII.total_metals_IMF_resampled[high_index_2d] +
sp->chemistry_data.metal_mass_fraction_total *
feedback_props->yield_SNII
.ejecta_IMF_resampled[high_index_2d]);
props->yield_SNII.ejecta_IMF_resampled[high_index_2d]);
}
metal_mass_released_total = integrate_imf(log10_min_mass, log10_max_mass, 2,
stellar_yields, feedback_props);
metal_mass_released_total =
integrate_imf(log10_min_mass, log10_max_mass,
eagle_imf_integration_yield_weight, stellar_yields, props);
/* yield normalization */
float mass_ejected, mass_released;
......@@ -473,13 +470,13 @@ inline static void evolve_SNII(
eagle_feedback_SNII_N_metals,
eagle_feedback_N_imf_bins);
stellar_yields[mass_bin_index] =
(1 - dz) *
feedback_props->yield_SNII.ejecta_IMF_resampled[low_index_2d] +
dz * feedback_props->yield_SNII.ejecta_IMF_resampled[high_index_2d];
(1 - dz) * props->yield_SNII.ejecta_IMF_resampled[low_index_2d] +
dz * props->yield_SNII.ejecta_IMF_resampled[high_index_2d];
}
mass_ejected = integrate_imf(log10_min_mass, log10_max_mass, 2,
stellar_yields, feedback_props);
mass_ejected =
integrate_imf(log10_min_mass, log10_max_mass,
eagle_imf_integration_yield_weight, stellar_yields, props);
/* compute the total mass released */
mass_released = metal_mass_released_total +
......@@ -518,20 +515,20 @@ inline static void evolve_SNII(
* @param log10_max_mass log10 mass at the beginning of step
* @param stellar_yields array to store calculated yields for passing to
* integrate_imf
* @param feedback_props star properties data structure
* @param sp spart we are computing feedback from
* @param props Properties of the feedback model.
* @param sp spart we are computing feedback for.
*/
inline static void evolve_AGB(
float log10_min_mass, float log10_max_mass, float* stellar_yields,
const struct feedback_props* restrict feedback_props,
struct spart* restrict sp) {
inline static void evolve_AGB(const float log10_min_mass, float log10_max_mass,
float* stellar_yields,
const struct feedback_props* props,
struct spart* sp) {
int low_imf_mass_bin_index, high_imf_mass_bin_index, mass_bin_index;
/* If mass at end of step is greater than tabulated lower bound for IMF, limit
* it.*/
if (log10_max_mass > feedback_props->log10_SNII_min_mass_msun)
log10_max_mass = feedback_props->log10_SNII_min_mass_msun;
if (log10_max_mass > props->log10_SNII_min_mass_msun)
log10_max_mass = props->log10_SNII_min_mass_msun;
/* Don't do anything if the stellar mass hasn't decreased by the end of the
* step */
......@@ -539,7 +536,7 @@ inline static void evolve_AGB(
/* determine which IMF mass bins contribute to the integral */
determine_imf_bins(log10_min_mass, log10_max_mass, &low_imf_mass_bin_index,
&high_imf_mass_bin_index, feedback_props);
&high_imf_mass_bin_index, props);
/* determine which metallicity bin and offset this star belongs to */
int iz_low = 0, iz_high = 0, low_index_3d, high_index_3d, low_index_2d,
......@@ -547,7 +544,7 @@ inline static void evolve_AGB(
float dz = 0.f;
determine_bin_yield_AGB(&iz_low, &iz_high, &dz,
log10(sp->chemistry_data.metal_mass_fraction_total),
feedback_props);
props);
/* compute metals produced */
float metal_mass_released[chemistry_element_count], metal_mass_released_total;
......@@ -567,19 +564,17 @@ inline static void evolve_AGB(
eagle_feedback_AGB_N_metals,
eagle_feedback_N_imf_bins);
stellar_yields[mass_bin_index] =
(1 - dz) *
(feedback_props->yield_AGB.yield_IMF_resampled[low_index_3d] +
sp->chemistry_data.metal_mass_fraction[elem] *
feedback_props->yield_AGB
.ejecta_IMF_resampled[low_index_2d]) +
dz * (feedback_props->yield_AGB.yield_IMF_resampled[high_index_3d] +
(1 - dz) * (props->yield_AGB.yield_IMF_resampled[low_index_3d] +
sp->chemistry_data.metal_mass_fraction[elem] *
props->yield_AGB.ejecta_IMF_resampled[low_index_2d]) +
dz * (props->yield_AGB.yield_IMF_resampled[high_index_3d] +
sp->chemistry_data.metal_mass_fraction[elem] *
feedback_props->yield_AGB
.ejecta_IMF_resampled[high_index_2d]);
props->yield_AGB.ejecta_IMF_resampled[high_index_2d]);
}
metal_mass_released[elem] = integrate_imf(log10_min_mass, log10_max_mass, 2,
stellar_yields, feedback_props);
metal_mass_released[elem] = integrate_imf(
log10_min_mass, log10_max_mass, eagle_imf_integration_yield_weight,
stellar_yields, props);
}
/* Compute mass produced */
......@@ -592,20 +587,17 @@ inline static void evolve_AGB(
row_major_index_2d(iz_high, mass_bin_index, eagle_feedback_AGB_N_metals,
eagle_feedback_N_imf_bins);
stellar_yields[mass_bin_index] =
(1 - dz) *
(feedback_props->yield_AGB
.total_metals_IMF_resampled[low_index_2d] +
sp->chemistry_data.metal_mass_fraction_total *
feedback_props->yield_AGB.ejecta_IMF_resampled[low_index_2d]) +
dz *
(feedback_props->yield_AGB
.total_metals_IMF_resampled[high_index_2d] +
sp->chemistry_data.metal_mass_fraction_total *
feedback_props->yield_AGB.ejecta_IMF_resampled[high_index_2d]);
(1 - dz) * (props->yield_AGB.total_metals_IMF_resampled[low_index_2d] +
sp->chemistry_data.metal_mass_fraction_total *
props->yield_AGB.ejecta_IMF_resampled[low_index_2d]) +
dz * (props->yield_AGB.total_metals_IMF_resampled[high_index_2d] +
sp->chemistry_data.metal_mass_fraction_total *
props->yield_AGB.ejecta_IMF_resampled[high_index_2d]);
}
metal_mass_released_total = integrate_imf(log10_min_mass, log10_max_mass, 2,
stellar_yields, feedback_props);
metal_mass_released_total =
integrate_imf(log10_min_mass, log10_max_mass,
eagle_imf_integration_yield_weight, stellar_yields, props);
/* yield normalization */
float mass_ejected, mass_released;
......@@ -626,13 +618,13 @@ inline static void evolve_AGB(
row_major_index_2d(iz_high, mass_bin_index, eagle_feedback_AGB_N_metals,
eagle_feedback_N_imf_bins);
stellar_yields[mass_bin_index] =
(1 - dz) *
feedback_props->yield_AGB.ejecta_IMF_resampled[low_index_2d] +
dz * feedback_props->yield_AGB.ejecta_IMF_resampled[high_index_2d];
(1 - dz) * props->yield_AGB.ejecta_IMF_resampled[low_index_2d] +
dz * props->yield_AGB.ejecta_IMF_resampled[high_index_2d];
}
mass_ejected = integrate_imf(log10_min_mass, log10_max_mass, 2,
stellar_yields, feedback_props);
mass_ejected =
integrate_imf(log10_min_mass, log10_max_mass,
eagle_imf_integration_yield_weight, stellar_yields, props);
/* compute the total mass released */
mass_released = metal_mass_released_total +
......@@ -665,7 +657,8 @@ inline static void evolve_AGB(
* @brief calculates stellar mass in spart that died over the timestep, calls
* functions to calculate feedback due to SNIa, SNII and AGB
*
* @param star_properties feedback_props_props data structure
* @param feedback_props feedback_props data structure
* @param cosmo The cosmological model.
* @param sp spart that we're evolving
* @param us unit_system data structure
* @param age age of spart at beginning of step
......@@ -745,11 +738,12 @@ void compute_stellar_evolution(const struct feedback_props* feedback_props,
*
* By default, takes the values provided by the hydro.
*
* @param sp The #feedback_properties.
* @param fp The #feedback_props.
* @param phys_const The physical constants in the internal unit system.
* @param us The internal unit system.
* @param params The parsed parameters.
* @param p The already read-in properties of the hydro scheme.
* @param hydro_props The already read-in properties of the hydro scheme.
* @param cosmo The cosmological model.
*/
void feedback_props_init(struct feedback_props* fp,
const struct phys_const* phys_const,
......
......@@ -109,7 +109,7 @@ __attribute__((always_inline)) INLINE static void feedback_prepare_spart(
* this information to a different MPI rank.
*
* @param sp The particle to act upon
* @param feedback_propss The #feedback_props structure.
* @param feedback_props The #feedback_props structure.
* @param cosmo The current cosmological model.
* @param us The unit system.
* @param star_age_beg_step The age of the star at the star of the time-step in
......
......@@ -28,19 +28,18 @@
* @param hj Comoving smoothing-length of particle j.
* @param si First sparticle.
* @param pj Second particle (not updated).
* @param a Current scale factor.
* @param H Current Hubble parameter.
* @param xp Extra particle data
* @param xp Extra particle data (not updated).
* @param cosmo The cosmological model.
* @param ti_current Current integer time value
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_feedback_density(float r2, const float *dx, float hi,
float hj, struct spart *restrict si,
runner_iact_nonsym_feedback_density(const float r2, const float *dx,
const float hi, const float hj,
struct spart *restrict si,
const struct part *restrict pj,
const struct cosmology *restrict cosmo,
const struct feedback_props *feedback_props,
const struct xpart *restrict xp,
integertime_t ti_current) {
const struct cosmology *restrict cosmo,
const integertime_t ti_current) {
/* Get the gas mass. */
const float mj = hydro_get_mass(pj);
......@@ -75,21 +74,21 @@ runner_iact_nonsym_feedback_density(float r2, const float *dx, float hi,
* @param dx Comoving vector separating both particles (si - pj).
* @param hi Comoving smoothing-length of particle i.
* @param hj Comoving smoothing-length of particle j.
* @param si First (star) particle.
* @param si First (star) particle (not updated).
* @param pj Second (gas) particle.
* @param a Current scale factor.
* @param H Current Hubble parameter.
* @param xp Extra particle data
* @param cosmo The cosmological model.
* @param ti_current Current integer time used value for seeding random number
* generator
*/
__attribute__((always_inline)) INLINE static void
runner_iact_nonsym_feedback_apply(
float r2, const float *dx, float hi, float hj,
const struct spart *restrict si, struct part *restrict pj,
const struct cosmology *restrict cosmo,
const struct feedback_props *restrict feedback_props,
struct xpart *restrict xp, integertime_t ti_current) {
runner_iact_nonsym_feedback_apply(const float r2, const float *dx,
const float hi, const float hj,
const struct spart *restrict si,
struct part *restrict pj,
struct xpart *restrict xp,
const struct cosmology *restrict cosmo,
const integertime_t ti_current) {
/* Get r and 1/r. */
const float r_inv = 1.0f / sqrtf(r2);
......
......@@ -93,12 +93,14 @@ struct feedback_props {
/* Array of mass bins for yield calculations */
double *yield_mass_bins;
/* Table of lifetime values */
struct lifetime_table lifetimes;
/* Location of yield tables */
char yield_table_path[200];
/* ------------- Lifetime tracks --------------- */
/* Table of lifetime values */
struct lifetime_table lifetimes;
/* ------------- SNII parameters --------------- */
/* Array of adjustment factors for SNII */
......
......@@ -44,7 +44,7 @@ enum eagle_imf_integration_type {
* @param log10_max_mass Upper mass bound
* @param i_min (return) Index of IMF mass bin containing log10_min_mass
* @param i_max (return) Index of IMF mass bin containing log10_max_mass
* @param star_properties the #stars_props data struct
* @param feedback_props the #feedback_props data struct
*/
inline static void determine_imf_bins(
double log10_min_mass, double log10_max_mass, int *i_min, int *i_max,
......@@ -87,7 +87,7 @@ inline static void determine_imf_bins(
* @param mode Type of weighting for the IMF integration.
* @param stellar_yields Array of weights based on yields. Used only for
* yield-weighted integration.
* @param star_properties the #stars_props data structure
* @param feedback_props the #feedback_props data structure
*/
inline static float integrate_imf(const float log10_min_mass,
const float log10_max_mass,
......@@ -192,7 +192,8 @@ inline static float integrate_imf(const float log10_min_mass,
* @brief Allocate space for IMF table and compute values to populate this
* table.
*
* @param star_properties #stars_props data structure */
* @param feedback_props #feedback_props data structure
*/
inline static void init_imf(struct feedback_props *feedback_props) {
/* Compute size of mass bins in log10 space */
......@@ -265,7 +266,7 @@ inline static void init_imf(struct feedback_props *feedback_props) {
*
* @param age_Gyr age of star in Gyr.
* @param Z Star's metallicity (metal mass fraction).
* @param star_properties the #stars_props data structure.
* @param feedback_props the #feedback_props data structure.
* @return Mass of stars died up to that age in solar masses.
*/
inline static float dying_mass_msun(
......
......@@ -81,7 +81,7 @@ inline static int get_element_index(const char *element_name,
* @brief reads yield tables, flattens and stores them in stars_props data
* struct
*
* @param stars the #stars_props data structure
* @param feedback_props the #feedback_props data struct to read the table into.
*/
inline static void read_yield_tables(struct feedback_props *feedback_props) {
......@@ -384,7 +384,7 @@ inline static void read_yield_tables(struct feedback_props *feedback_props) {
/**
* @brief allocates space for the yield tables
*
* @param stars the #stars_props data struct to store the tables in
* @param feedback_props the #feedback_props data struct to store the tables in
*/
inline static void allocate_yield_tables(
struct feedback_props *feedback_props) {
......@@ -604,7 +604,7 @@ inline static void allocate_yield_tables(
/**
* @brief resamples yields based on IMF mass bins
*
* @param stars the #stars_props data structure
* @param feedback_props the #feedback_props data struct.
*/
inline static void compute_yields(struct feedback_props *feedback_props) {
......@@ -754,7 +754,7 @@ inline static void compute_yields(struct feedback_props *feedback_props) {
/**
* @brief resamples ejecta based on IMF mass bins
*
* @param stars the #stars_props data structure
* @param feedback_props the #feedback_props data struct.
*/
inline static void compute_ejecta(struct feedback_props *feedback_props) {
......
......@@ -90,7 +90,6 @@ void DOSELF1_STARS(struct runner *r, struct cell *c, int timer) {
const struct engine *e = r->e;
const integertime_t ti_current = e->ti_current;
const struct cosmology *cosmo = e->cosmology;
const struct feedback_props *feedback_props = e->feedback_props;
/* Anything to do here? */
if (c->hydro.count == 0 || c->stars.count == 0) return;
......@@ -146,11 +145,11 @@ void DOSELF1_STARS(struct runner *r, struct cell *c, int timer) {
if (r2 < hig2) {
IACT_STARS(r2, dx, hi, hj, si, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_feedback_density(r2, dx, hi, hj, si, pj, cosmo,
feedback_props, xpj, ti_current);
runner_iact_nonsym_feedback_density(r2, dx, hi, hj, si, pj, xpj, cosmo,
ti_current);
#elif (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, si, pj, cosmo,
feedback_props, xpj, ti_current);
runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, si, pj, xpj, cosmo,
ti_current);
#endif
}
} /* loop over the parts in ci. */
......@@ -178,7 +177,6 @@ void DO_NONSYM_PAIR1_STARS_NAIVE(struct runner *r, struct cell *restrict ci,
const struct engine *e = r->e;
const integertime_t ti_current = e->ti_current;
const struct cosmology *cosmo = e->cosmology;
const struct feedback_props *feedback_props = e->feedback_props;
/* Anything to do here? */
if (cj->hydro.count == 0 || ci->stars.count == 0) return;
......@@ -244,11 +242,11 @@ void DO_NONSYM_PAIR1_STARS_NAIVE(struct runner *r, struct cell *restrict ci,
IACT_STARS(r2, dx, hi, hj, si, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_feedback_density(r2, dx, hi, hj, si, pj, cosmo,
feedback_props, xpj, ti_current);
runner_iact_nonsym_feedback_density(r2, dx, hi, hj, si, pj, xpj, cosmo,
ti_current);
#elif (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, si, pj, cosmo,
feedback_props, xpj, ti_current);
runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, si, pj, xpj, cosmo,
ti_current);
#endif
}
} /* loop over the parts in cj. */
......@@ -270,7 +268,6 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
const struct engine *e = r->e;
const integertime_t ti_current = e->ti_current;
const struct cosmology *cosmo = e->cosmology;
const struct feedback_props *feedback_props = e->feedback_props;
/* Cosmological terms */
const float a = cosmo->a;
......@@ -408,11 +405,11 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
IACT_STARS(r2, dx, hi, hj, spi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_feedback_density(r2, dx, hi, hj, spi, pj, cosmo,
feedback_props, xpj, ti_current);
runner_iact_nonsym_feedback_density(r2, dx, hi, hj, spi, pj, xpj,
cosmo, ti_current);
#elif (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, spi, pj, cosmo,
feedback_props, xpj, ti_current);
runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, spi, pj, xpj, cosmo,
ti_current);
#endif
}
} /* loop over the parts in cj. */
......@@ -534,11 +531,11 @@ void DO_SYM_PAIR1_STARS(struct runner *r, struct cell *ci, struct cell *cj,
IACT_STARS(r2, dx, hj, hi, spj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_feedback_density(r2, dx, hj, hi, spj, pi, cosmo,
feedback_props, xpi, ti_current);
runner_iact_nonsym_feedback_density(r2, dx, hj, hi, spj, pi, xpi,
cosmo, ti_current);
#elif (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
runner_iact_nonsym_feedback_apply(r2, dx, hj, hi, spj, pi, cosmo,
feedback_props, xpi, ti_current);
runner_iact_nonsym_feedback_apply(r2, dx, hj, hi, spj, pi, xpi, cosmo,
ti_current);
#endif
}
} /* loop over the parts in ci. */
......@@ -587,7 +584,6 @@ void DOPAIR1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
const struct engine *e = r->e;
const integertime_t ti_current = e->ti_current;
const struct cosmology *cosmo = e->cosmology;
const struct feedback_props *feedback_props = e->feedback_props;
/* Cosmological terms */
const float a = cosmo->a;
......@@ -653,11 +649,11 @@ void DOPAIR1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
IACT_STARS(r2, dx, hi, hj, spi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_feedback_density(r2, dx, hi, hj, spi, pj, cosmo,
feedback_props, xpj, ti_current);
runner_iact_nonsym_feedback_density(r2, dx, hi, hj, spi, pj, xpj,
cosmo, ti_current);
#elif (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, spi, pj, cosmo,
feedback_props, xpj, ti_current);
runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, spi, pj, xpj, cosmo,
ti_current);
#endif
}
} /* loop over the parts in cj. */
......@@ -713,11 +709,11 @@ void DOPAIR1_SUBSET_STARS(struct runner *r, struct cell *restrict ci,
IACT_STARS(r2, dx, hi, hj, spi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_feedback_density(r2, dx, hi, hj, spi, pj, cosmo,
feedback_props, xpj, ti_current);
runner_iact_nonsym_feedback_density(r2, dx, hi, hj, spi, pj, xpj,
cosmo, ti_current);
#elif (FUNCTION_TASK_LOOP == TASK_LOOP_FEEDBACK)
runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, spi, pj, cosmo,
feedback_props, xpj, ti_current);
runner_iact_nonsym_feedback_apply(r2, dx, hi, hj, spi, pj, xpj, cosmo,
ti_current);
#endif
}
} /* loop over the parts in cj. */
......@@ -751,7 +747,6 @@ void DOPAIR1_SUBSET_STARS_NAIVE(struct runner *r, struct cell *restrict ci,
const struct engine *e = r->e;
const integertime_t ti_current = e->ti_current;
const struct cosmology *cosmo = e->cosmology;