Commit 2be4da32 authored by Folkert Nobels's avatar Folkert Nobels
Browse files

Update the names in the logger to be more consistent with the rest of the code

parent 015452a9
......@@ -2392,7 +2392,7 @@ void engine_collect_end_of_step_recurse(struct cell *c,
s_inhibited += cp->stars.inhibited;
/* Add the star formation history in this cell to sfh_updated */
star_formation_get_total_cell(cp, &sfh_updated);
star_formation_logger_add(cp, &sfh_updated);
/* Collected, so clear for next time. */
cp->hydro.updated = 0;
......@@ -2417,7 +2417,7 @@ void engine_collect_end_of_step_recurse(struct cell *c,
c->stars.inhibited = s_inhibited;
/* Store the star formation history in the parent cell */
star_formation_add_to_parent_cell(c, &sfh_updated);
star_formation_logger_assign(c, &sfh_updated);
}
/**
......@@ -2487,7 +2487,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_get_total_cell(c, &sfh_updated);
star_formation_logger_add(c, &sfh_updated);
/* Collected, so clear for next time. */
c->hydro.updated = 0;
......@@ -2508,7 +2508,7 @@ void engine_collect_end_of_step_mapper(void *map_data, int num_elements,
data->s_inhibited += s_inhibited;
/* Add the SFH information from this engine to the global data */
star_formation_add_progeny_SFH(sfh_top, &sfh_updated);
star_formation_logger_log_progeny_cell(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);
......
......@@ -590,7 +590,7 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
/* Anything to do here? */
if (!cell_is_active_hydro(c, e)) {
star_formation_init_SFH_inactive(&c->stars.sfh);
star_formation_logger_log_inactive_cell(&c->stars.sfh);
return;
}
star_formation_logger_log_active_cell(&c->stars.sfh);
......@@ -606,7 +606,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_add_progeny_SFH(&c->stars.sfh, &cp->stars.sfh);
star_formation_logger_log_progeny_cell(&c->stars.sfh, &cp->stars.sfh);
}
} else {
......@@ -644,7 +644,7 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
dt_star);
/* Add the SFR and SFR*dt to the SFH struct of this cell */
star_formation_log_for_active_particles(p, xp, &c->stars.sfh,
star_formation_logger_log_active_part(p, xp, &c->stars.sfh,
dt_star);
/* Are we forming a star particle from this SF rate? */
......@@ -659,7 +659,7 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
with_cosmology);
/* Update the Star formation history */
star_formation_update_stellar_mass(sp, &c->stars.sfh);
star_formation_logger_log_new_spart(sp, &c->stars.sfh);
}
} else { /* Are we not star-forming? */
......@@ -670,7 +670,7 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) {
} /* Not Star-forming? */
} else { /* is active? */
star_formation_log_for_inactive_particles(p, xp, &c->stars.sfh);
star_formation_logger_log_inactive_part(p, xp, &c->stars.sfh);
}
} /* Loop over particles */
}
......
......@@ -2777,7 +2777,7 @@ void space_split_recursive(struct space *s, struct cell *c,
ti_stars_end_min = min(ti_stars_end_min, cp->stars.ti_end_min);
ti_stars_end_max = min(ti_stars_end_max, cp->stars.ti_end_max);
ti_stars_beg_max = min(ti_stars_beg_max, cp->stars.ti_beg_max);
star_formation_recurse_SFR_rebuilt(c, cp);
star_formation_logger_recurse_SFR_rebuild(c, cp);
/* Increase the depth */
if (cp->maxdepth > maxdepth) maxdepth = cp->maxdepth;
......@@ -2918,7 +2918,7 @@ void space_split_recursive(struct space *s, struct cell *c,
hydro_time_bin_max = max(hydro_time_bin_max, parts[k].time_bin);
h_max = max(h_max, parts[k].h);
/* Collect SFR from the particles after rebuilt */
star_formation_SFR_rebuilt(&parts[k], &xparts[k], &c->stars.sfh);
star_formation_logger_log_part_rebuild(&parts[k], &xparts[k], &c->stars.sfh);
}
/* xparts: Reset x_diff */
......
......@@ -35,7 +35,7 @@
* @param sp new created star particle
* @param sf the star_formation_history struct of the current cell
*/
INLINE static void star_formation_update_stellar_mass(
INLINE static void star_formation_logger_log_new_spart(
const struct spart *sp, struct star_formation_history *sf) {
/* Add mass of created sparticle to the total stellar mass in this cell*/
......@@ -69,7 +69,7 @@ INLINE static void star_formation_logger_log_active_cell(
*
* @param sf the star_formation_history struct we want to initialize
*/
INLINE static void star_formation_init_SFH_inactive(
INLINE static void star_formation_logger_log_inactive_cell(
struct star_formation_history *sf) {
/* Initialize the stellar mass to zero*/
......@@ -91,7 +91,7 @@ INLINE static void star_formation_init_SFH_inactive(
* @param sf parent SFH struct
* @param sfprogeny progeny SFH struct
*/
INLINE static void star_formation_add_progeny_SFH(
INLINE static void star_formation_logger_log_progeny_cell(
struct star_formation_history *sf,
const struct star_formation_history *sfprogeny) {
......@@ -116,7 +116,7 @@ INLINE static void star_formation_add_progeny_SFH(
* @param sf the star formation structure to which we want to add the star
* formation
*/
INLINE static void star_formation_get_total_cell(
INLINE static void star_formation_logger_add(
struct cell *c, struct star_formation_history *sf) {
/* Get the star formation history struct from the cell */
......@@ -138,7 +138,7 @@ INLINE static void star_formation_get_total_cell(
* @param c the cell for which we want to add the star formation
* @param sf the combined star formation history of the progeny
*/
INLINE static void star_formation_add_to_parent_cell(
INLINE static void star_formation_logger_assign(
struct cell *c, const struct star_formation_history *sf) {
/* Get the star formation history from the cell */
......@@ -232,7 +232,7 @@ INLINE static void star_formation_init_file_writer(const char *baseName) {
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_log_for_active_particles(
INLINE static void star_formation_logger_log_active_part(
const struct part *p, const struct xpart *xp,
struct star_formation_history *sf, const double dt_star) {
......@@ -251,7 +251,7 @@ INLINE static void star_formation_log_for_active_particles(
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_log_for_inactive_particles(
INLINE static void star_formation_logger_log_inactive_part(
const struct part *p, const struct xpart *xp,
struct star_formation_history *sf) {
......@@ -266,7 +266,7 @@ INLINE static void star_formation_log_for_inactive_particles(
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_SFR_rebuilt(
INLINE static void star_formation_logger_log_part_rebuild(
const struct part *p, const struct xpart *xp,
struct star_formation_history *sf) {
......@@ -281,7 +281,7 @@ INLINE static void star_formation_SFR_rebuilt(
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_recurse_SFR_rebuilt(struct cell *c,
INLINE static void star_formation_logger_recurse_SFR_rebuild(struct cell *c,
const struct cell *cp) {
struct star_formation_history *sf = &c->stars.sfh;
......
......@@ -35,7 +35,7 @@
* @param sp new created star particle
* @param sf the star_formation_history struct of the current cell
*/
INLINE static void star_formation_update_stellar_mass(
INLINE static void star_formation_logger_log_new_spart(
struct spart *sp, struct star_formation_history *sf) {}
/**
......@@ -60,7 +60,7 @@ INLINE static void star_formation_logger_log_active_cell(
*
* @param sf the star_formation_history struct we want to initialize
*/
INLINE static void star_formation_init_SFH_inactive(
INLINE static void star_formation_logger_log_inactive_cell(
struct star_formation_history *sf) {}
/**
......@@ -69,7 +69,7 @@ INLINE static void star_formation_init_SFH_inactive(
* @param sf parent SFH struct
* @param sfprogeny progeny SFH struct
*/
INLINE static void star_formation_add_progeny_SFH(
INLINE static void star_formation_logger_log_progeny_cell(
struct star_formation_history *sf,
const struct star_formation_history *sfprogeny) {}
......@@ -81,7 +81,7 @@ INLINE static void star_formation_add_progeny_SFH(
* @param sf the star formation structure to which we want to add the star
* formation
*/
INLINE static void star_formation_get_total_cell(
INLINE static void star_formation_logger_add(
struct cell *c, struct star_formation_history *sf) {}
/**
......@@ -90,7 +90,7 @@ INLINE static void star_formation_get_total_cell(
* @param c the cell for which we want to add the star formation
* @param sf the combined star formation history of the progeny
*/
INLINE static void star_formation_add_to_parent_cell(
INLINE static void star_formation_logger_assign(
struct cell *c, struct star_formation_history *sf) {}
/**
......@@ -127,7 +127,7 @@ INLINE static void star_formation_init_file_writer(const char *baseName) {}
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_log_for_active_particles(
INLINE static void star_formation_logger_log_active_part(
const struct part *p, const struct xpart *xp,
struct star_formation_history *sf, const double dt_star) {}
......@@ -139,7 +139,7 @@ INLINE static void star_formation_log_for_active_particles(
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_log_for_inactive_particles(
INLINE static void star_formation_logger_log_inactive_part(
const struct part *p, const struct xpart *xp,
struct star_formation_history *sf) {}
......@@ -150,7 +150,7 @@ INLINE static void star_formation_log_for_inactive_particles(
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_SFR_rebuilt(
INLINE static void star_formation_logger_log_part_rebuild(
const struct part *p, const struct xpart *xp,
struct star_formation_history *sf) {}
......@@ -161,7 +161,7 @@ INLINE static void star_formation_SFR_rebuilt(
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_recurse_SFR_rebuilt(struct cell *c,
INLINE static void star_formation_logger_recurse_SFR_rebuild(struct cell *c,
const struct cell *cp) {}
#endif /* SWIFT_GEAR_STARFORMATION_LOGGER_H */
......@@ -35,7 +35,7 @@
* @param sp new created star particle
* @param sf the star_formation_history struct of the current cell
*/
INLINE static void star_formation_update_stellar_mass(
INLINE static void star_formation_logger_log_new_spart(
struct spart *sp, struct star_formation_history *sf) {}
/**
......@@ -60,7 +60,7 @@ INLINE static void star_formation_logger_log_active_cell(
*
* @param sf the star_formation_history struct we want to initialize
*/
INLINE static void star_formation_init_SFH_inactive(
INLINE static void star_formation_logger_log_inactive_cell(
struct star_formation_history *sf) {}
/**
......@@ -69,7 +69,7 @@ INLINE static void star_formation_init_SFH_inactive(
* @param sf parent SFH struct
* @param sfprogeny progeny SFH struct
*/
INLINE static void star_formation_add_progeny_SFH(
INLINE static void star_formation_logger_log_progeny_cell(
struct star_formation_history *sf,
const struct star_formation_history *sfprogeny) {}
......@@ -81,7 +81,7 @@ INLINE static void star_formation_add_progeny_SFH(
* @param sf the star formation structure to which we want to add the star
* formation
*/
INLINE static void star_formation_get_total_cell(
INLINE static void star_formation_logger_add(
struct cell *c, struct star_formation_history *sf) {}
/**
......@@ -90,7 +90,7 @@ INLINE static void star_formation_get_total_cell(
* @param c the cell for which we want to add the star formation
* @param sf the combined star formation history of the progeny
*/
INLINE static void star_formation_add_to_parent_cell(
INLINE static void star_formation_logger_assign(
struct cell *c, struct star_formation_history *sf) {}
/**
......@@ -127,7 +127,7 @@ INLINE static void star_formation_init_file_writer(const char *baseName) {}
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_log_for_active_particles(
INLINE static void star_formation_logger_log_active_part(
const struct part *p, const struct xpart *xp,
struct star_formation_history *sf, const double dt_star) {}
......@@ -139,7 +139,7 @@ INLINE static void star_formation_log_for_active_particles(
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_log_for_inactive_particles(
INLINE static void star_formation_logger_log_inactive_part(
const struct part *p, const struct xpart *xp,
struct star_formation_history *sf) {}
......@@ -150,7 +150,7 @@ INLINE static void star_formation_log_for_inactive_particles(
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_SFR_rebuilt(
INLINE static void star_formation_logger_log_part_rebuild(
const struct part *p, const struct xpart *xp,
struct star_formation_history *sf) {}
......@@ -161,7 +161,7 @@ INLINE static void star_formation_SFR_rebuilt(
* @param xp the #xpart
* @param sf the SFH logger struct
*/
INLINE static void star_formation_recurse_SFR_rebuilt(struct cell *c,
INLINE static void star_formation_logger_recurse_SFR_rebuild(struct cell *c,
const struct cell *cp) {}
#endif /* SWIFT_GEAR_STARFORMATION_LOGGER_H */
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