Skip to content
Snippets Groups Projects
Commit e67aeacc authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Add the number of chemistry elements to the snapshot headers

parent 2a65eeca
Branches
Tags
No related merge requests found
...@@ -283,6 +283,8 @@ INLINE static int chemistry_write_bparticles(const struct bpart* bparts, ...@@ -283,6 +283,8 @@ INLINE static int chemistry_write_bparticles(const struct bpart* bparts,
INLINE static void chemistry_write_flavour(hid_t h_grp) { INLINE static void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s(h_grp, "Chemistry Model", "EAGLE"); io_write_attribute_s(h_grp, "Chemistry Model", "EAGLE");
io_write_attribute_d(h_grp, "Chemistry element count",
chemistry_element_count);
for (int elem = 0; elem < chemistry_element_count; ++elem) { for (int elem = 0; elem < chemistry_element_count; ++elem) {
char buffer[20]; char buffer[20];
sprintf(buffer, "Element %d", elem); sprintf(buffer, "Element %d", elem);
......
...@@ -116,6 +116,8 @@ INLINE static int chemistry_write_bparticles(const struct bpart* bparts, ...@@ -116,6 +116,8 @@ INLINE static int chemistry_write_bparticles(const struct bpart* bparts,
INLINE static void chemistry_write_flavour(hid_t h_grp) { INLINE static void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s(h_grp, "Chemistry Model", "GEAR"); io_write_attribute_s(h_grp, "Chemistry Model", "GEAR");
io_write_attribute_d(h_grp, "Chemistry element count",
GEAR_CHEMISTRY_ELEMENT_COUNT);
} }
#endif #endif
......
...@@ -98,6 +98,7 @@ INLINE static int chemistry_write_bparticles(const struct bpart* bparts, ...@@ -98,6 +98,7 @@ INLINE static int chemistry_write_bparticles(const struct bpart* bparts,
INLINE static void chemistry_write_flavour(hid_t h_grp) { INLINE static void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s(h_grp, "Chemistry Model", "None"); io_write_attribute_s(h_grp, "Chemistry Model", "None");
io_write_attribute_d(h_grp, "Chemistry element count", 0);
} }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment