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

More canonical signature for the star_formation_logger_add() function.

parent 3735abd8
......@@ -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);
......
......@@ -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 {
......
......@@ -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;
......
......@@ -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 */
......@@ -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
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment