diff --git a/src/engine.c b/src/engine.c index 42de0494a3265d0de8b7c94e2a3f2f2c5609b0f4..ed2fa2ed78ac310afce5bedb2f87e8e6683d7a52 100644 --- a/src/engine.c +++ b/src/engine.c @@ -2721,7 +2721,7 @@ void engine_collect_end_of_step_recurse_hydro(struct cell *c, } /* Add the star formation history in this cell to sfh_updated */ - star_formation_logger_add_first_to_second(&cp->stars.sfh, &sfh_updated); + star_formation_logger_add(&sfh_updated, &cp->stars.sfh); /* Collected, so clear for next time. */ cp->hydro.updated = 0; @@ -2736,7 +2736,7 @@ void engine_collect_end_of_step_recurse_hydro(struct cell *c, c->hydro.inhibited = inhibited; /* Store the star formation history in the parent cell */ - star_formation_logger_add_first_to_second(&sfh_updated, &c->stars.sfh); + star_formation_logger_add(&c->stars.sfh, &sfh_updated); } /** @@ -3024,7 +3024,7 @@ void engine_collect_end_of_step_mapper(void *map_data, int num_elements, /* Get the star formation history from the current cell and store it in * the star formation history struct */ - star_formation_logger_add_first_to_second(&c->stars.sfh, &sfh_updated); + star_formation_logger_add(&sfh_updated, &c->stars.sfh); /* Collected, so clear for next time. */ c->hydro.updated = 0; @@ -3048,7 +3048,7 @@ void engine_collect_end_of_step_mapper(void *map_data, int num_elements, data->b_inhibited += b_inhibited; /* Add the SFH information from this engine to the global data */ - star_formation_logger_add_first_to_second(&sfh_updated, sfh_top); + star_formation_logger_add(sfh_top, &sfh_updated); if (ti_hydro_end_min > e->ti_current) data->ti_hydro_end_min = min(ti_hydro_end_min, data->ti_hydro_end_min); diff --git a/src/runner.c b/src/runner.c index ec5a0e9aaedab7e13859e01e8ac7fcacb25bd40c..d1511c5cb1f52aeb5bb6134f8cf4d5d91aeb6ff8 100644 --- a/src/runner.c +++ b/src/runner.c @@ -638,8 +638,7 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) { runner_do_star_formation(r, cp, 0); /* Update current cell using child cells */ - star_formation_logger_add_first_to_second(&cp->stars.sfh, - &c->stars.sfh); + star_formation_logger_add(&c->stars.sfh, &cp->stars.sfh); } } else { diff --git a/src/space.c b/src/space.c index 6b484639271641a5770cf14c54631bc6bc493770..3ad90c0036bef4690cee63d279e3fd6c5e99215f 100644 --- a/src/space.c +++ b/src/space.c @@ -3391,8 +3391,7 @@ void space_split_recursive(struct space *s, struct cell *c, min(ti_black_holes_end_max, cp->black_holes.ti_end_max); ti_black_holes_beg_max = min(ti_black_holes_beg_max, cp->black_holes.ti_beg_max); - star_formation_logger_add_first_to_second(&cp->stars.sfh, - &c->stars.sfh); + star_formation_logger_add(&c->stars.sfh, &cp->stars.sfh); /* Increase the depth */ if (cp->maxdepth > maxdepth) maxdepth = cp->maxdepth; diff --git a/src/star_formation/EAGLE/star_formation_logger.h b/src/star_formation/EAGLE/star_formation_logger.h index 1e2078c9d9c6aea7309e828a70998b3b9811d9ba..118eec03875a1a560965cdf587327df8065b99c4 100644 --- a/src/star_formation/EAGLE/star_formation_logger.h +++ b/src/star_formation/EAGLE/star_formation_logger.h @@ -16,8 +16,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *******************************************************************************/ -#ifndef SWIFT_SCHAYE_STARFORMATION_LOGGER_H -#define SWIFT_SCHAYE_STARFORMATION_LOGGER_H +#ifndef SWIFT_EAGLE_STARFORMATION_LOGGER_H +#define SWIFT_EAGLE_STARFORMATION_LOGGER_H /* Some standard headers */ #include <stdlib.h> @@ -73,7 +73,7 @@ INLINE static void star_formation_logger_log_inactive_cell( * formation history * @param sf_update the star formation structure which we want to update */ -INLINE static void star_formation_logger_add_first_to_second( +INLINE static void star_formation_logger_add( const struct star_formation_history *sf_add, struct star_formation_history *sf_update) { @@ -216,4 +216,4 @@ INLINE static void star_formation_logger_log_inactive_part( sf->SFR_inactive += max(xp->sf_data.SFR, 0.f); } -#endif /* SWIFT_SCHAYE_STARFORMATION_LOGGER_H */ +#endif /* SWIFT_EAGLE_STARFORMATION_LOGGER_H */ diff --git a/src/star_formation/GEAR/star_formation_logger.h b/src/star_formation/GEAR/star_formation_logger.h index aa47d5cb5b94e24ea85b3d8dfcfa1bb549ff3515..5b9e033d21d3d202f3c289d1dd6a843ba17fa524 100644 --- a/src/star_formation/GEAR/star_formation_logger.h +++ b/src/star_formation/GEAR/star_formation_logger.h @@ -55,9 +55,9 @@ INLINE static void star_formation_logger_log_inactive_cell( * formation history * @param sf_update the star formation structure which we want to update */ -INLINE static void star_formation_logger_add_first_to_second( - const struct star_formation_history *sf_add, - struct star_formation_history *sf_update) {} +INLINE static void star_formation_logger_add( + struct star_formation_history *sf_update, + const struct star_formation_history *sf_add) {} /** * @brief Initialize the star formation history structure in the #engine diff --git a/src/star_formation/none/star_formation_logger.h b/src/star_formation/none/star_formation_logger.h index 54e45540c828ade353faa46314bae3ebd8c09a3d..5fecb97e27b6235d5ce563b59690b6a4e7e716bc 100644 --- a/src/star_formation/none/star_formation_logger.h +++ b/src/star_formation/none/star_formation_logger.h @@ -55,9 +55,9 @@ INLINE static void star_formation_logger_log_inactive_cell( * formation history * @param sf_update the star formation structure which we want to update */ -INLINE static void star_formation_logger_add_first_to_second( - const struct star_formation_history *sf_add, - struct star_formation_history *sf_update) {} +INLINE static void star_formation_logger_add( + struct star_formation_history *sf_update, + const struct star_formation_history *sf_add) {} /** * @brief Initialize the star formation history structure in the #engine