diff --git a/src/parallel_io.c b/src/parallel_io.c index 449756293abc8345a092341217a9e36bca14c1d5..5974070fac645472bc3f68da1a9f505d60813e11 100644 --- a/src/parallel_io.c +++ b/src/parallel_io.c @@ -1030,7 +1030,16 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6], H5Gclose(h_grp); } - /* Print the gravity parameters */ + /* Print the stellar parameters */ + if (e->policy & engine_policy_stars) { + h_grp = H5Gcreate(h_file, "/StarsScheme", H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + if (h_grp < 0) error("Error while creating stars group"); + stars_props_print_snapshot(h_grp, e->stars_properties); + H5Gclose(h_grp); + } + + /* Print the cosmological parameters */ h_grp = H5Gcreate(h_file, "/Cosmology", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (h_grp < 0) error("Error while creating cosmology group"); diff --git a/src/serial_io.c b/src/serial_io.c index fa7fbb220b9b56a3b5ea87660f618dc1a47bb886..8c9298951311536adb52b96638b2472e089047c7 100644 --- a/src/serial_io.c +++ b/src/serial_io.c @@ -884,6 +884,15 @@ void write_output_serial(struct engine* e, const char* baseName, H5Gclose(h_grp); } + /* Print the stellar parameters */ + if (e->policy & engine_policy_stars) { + h_grp = H5Gcreate(h_file, "/StarsScheme", H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + if (h_grp < 0) error("Error while creating stars group"); + stars_props_print_snapshot(h_grp, e->stars_properties); + H5Gclose(h_grp); + } + /* Print the cosmological model */ h_grp = H5Gcreate(h_file, "/Cosmology", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); diff --git a/src/single_io.c b/src/single_io.c index 0238c21b10b7f35bd2e2618868ce8126562f736e..2e6ce4111f5258e53dbf4c9e366b534556cb1b05 100644 --- a/src/single_io.c +++ b/src/single_io.c @@ -734,6 +734,15 @@ void write_output_single(struct engine* e, const char* baseName, H5Gclose(h_grp); } + /* Print the stellar parameters */ + if (e->policy & engine_policy_stars) { + h_grp = H5Gcreate(h_file, "/StarsScheme", H5P_DEFAULT, H5P_DEFAULT, + H5P_DEFAULT); + if (h_grp < 0) error("Error while creating stars group"); + stars_props_print_snapshot(h_grp, e->stars_properties); + H5Gclose(h_grp); + } + /* Print the cosmological model */ h_grp = H5Gcreate(h_file, "/Cosmology", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);