Commit a5000aa9 authored by Loic Hausammann's avatar Loic Hausammann
Browse files

Add stars properties in snapshot

parent 7c7e16ac
......@@ -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");
......
......@@ -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);
......
......@@ -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);
......
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