diff --git a/src/runner.c b/src/runner.c index b2644d1882f3e64655df8b8d625352c7af38da8f..183204faad02d0e255820f4c9fe470ffa8bd8f53 100644 --- a/src/runner.c +++ b/src/runner.c @@ -663,11 +663,12 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) { #endif /* Anything to do here? */ - if (c->hydro.count == 0) return; - if (!cell_is_active_hydro(c, e)) { + if (c->hydro.count == 0 || !cell_is_active_hydro(c, e)) { star_formation_logger_log_inactive_cell(&c->stars.sfh); return; } + + /* Reset the SFR */ star_formation_logger_init(&c->stars.sfh); /* Recurse? */ @@ -746,8 +747,10 @@ void runner_do_star_formation(struct runner *r, struct cell *c, int timer) { star_formation_update_part_not_SFR(p, xp, e, sf_props, with_cosmology); - } /* Not Star-forming? */ + } /* Not Star-forming? */ + } else { /* is active? */ + /* Check if the particle is not inhibited */ if (!part_is_inhibited(p, e)) { star_formation_logger_log_inactive_part(p, xp, &c->stars.sfh); diff --git a/src/timers.c b/src/timers.c index 139078655d9c957ba6f7702c90b9f7b1eba09a92..8b0d4c4d83f7051bc9b6b9c02576d614303855b7 100644 --- a/src/timers.c +++ b/src/timers.c @@ -128,7 +128,7 @@ void timers_reset_all(void) { void timers_print(int step) { fprintf(timers_file, "%d\t", step); for (int k = 0; k < timer_count; k++) - fprintf(timers_file, "%22.3f ", clocks_from_ticks(timers[k])); + fprintf(timers_file, "%25.3f ", clocks_from_ticks(timers[k])); fprintf(timers_file, "\n"); fflush(timers_file); } @@ -144,9 +144,9 @@ void timers_open_file(int rank) { sprintf(buff, "timers_%d.txt", rank); timers_file = fopen(buff, "w"); - fprintf(timers_file, "# timers: \n# step | "); + fprintf(timers_file, "# timers: \n# step |"); for (int k = 0; k < timer_count; k++) - fprintf(timers_file, "%22s ", timers_names[k]); + fprintf(timers_file, "%25s ", timers_names[k]); fprintf(timers_file, "\n"); }