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

Be less verbose when initialising the cosmology model and when computing the next snapshot time.

parent 157bc5e8
......@@ -606,7 +606,7 @@ int main(int argc, char *argv[]) {
cosmology_init(params, &us, &prog_const, &cosmo);
else
cosmology_init_no_cosmo(&cosmo);
if (with_cosmology) cosmology_print(&cosmo);
if (myrank == 0 && with_cosmology) cosmology_print(&cosmo);
/* Initialise the hydro properties */
if (with_hydro) hydro_props_init(&hydro_properties, params);
......
......@@ -192,6 +192,7 @@ void cosmology_write_model(hid_t h_grp, const struct cosmology *c);
/* Dump/restore. */
void cosmology_struct_dump(const struct cosmology *cosmology, FILE *stream);
void cosmology_struct_restore(int enabled, struct cosmology *cosmology, FILE *stream);
void cosmology_struct_restore(int enabled, struct cosmology *cosmology,
FILE *stream);
#endif /* SWIFT_COSMOLOGY_H */
......@@ -5818,11 +5818,13 @@ void engine_compute_next_snapshot_time(struct engine *e) {
if (e->policy & engine_policy_cosmology) {
const float next_snapshot_time =
exp(e->ti_nextSnapshot * e->time_base) * e->cosmology->a_begin;
message("Next output time set to a=%e.", next_snapshot_time);
if (e->verbose)
message("Next output time set to a=%e.", next_snapshot_time);
} else {
const float next_snapshot_time =
e->ti_nextSnapshot * e->time_base + e->time_begin;
message("Next output time set to t=%e.", next_snapshot_time);
if (e->verbose)
message("Next output time set to t=%e.", next_snapshot_time);
}
}
}
......
Markdown is supported
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