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

Add the number of chemistry elements to the snapshot headers

parent 2a65eeca
......@@ -283,6 +283,8 @@ INLINE static int chemistry_write_bparticles(const struct bpart* bparts,
INLINE static void chemistry_write_flavour(hid_t h_grp) {
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) {
char buffer[20];
sprintf(buffer, "Element %d", elem);
......
......@@ -116,6 +116,8 @@ INLINE static int chemistry_write_bparticles(const struct bpart* bparts,
INLINE static void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s(h_grp, "Chemistry Model", "GEAR");
io_write_attribute_d(h_grp, "Chemistry element count",
GEAR_CHEMISTRY_ELEMENT_COUNT);
}
#endif
......
......@@ -98,6 +98,7 @@ INLINE static int chemistry_write_bparticles(const struct bpart* bparts,
INLINE static void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s(h_grp, "Chemistry Model", "None");
io_write_attribute_d(h_grp, "Chemistry element count", 0);
}
#endif
......
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