Commit 94969fd6 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Only compile the functions printing the chemistry models to snapshots if HDF5 is detected.

parent 6ebe6eb1
...@@ -95,6 +95,8 @@ int chemistry_write_particles(const struct part* parts, struct io_props* list) { ...@@ -95,6 +95,8 @@ int chemistry_write_particles(const struct part* parts, struct io_props* list) {
return 12; return 12;
} }
#ifdef HAVE_HDF5
/** /**
* @brief Writes the current model of SPH to the file * @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write * @param h_grpsph The HDF5 group in which to write
...@@ -108,5 +110,6 @@ void chemistry_write_flavour(hid_t h_grp) { ...@@ -108,5 +110,6 @@ void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s(h_grp, buffer, chemistry_get_element_name(elem)); io_write_attribute_s(h_grp, buffer, chemistry_get_element_name(elem));
} }
} }
#endif
#endif /* SWIFT_CHEMISTRY_IO_EAGLE_H */ #endif /* SWIFT_CHEMISTRY_IO_EAGLE_H */
...@@ -62,6 +62,8 @@ int chemistry_write_particles(const struct part* parts, struct io_props* list) { ...@@ -62,6 +62,8 @@ int chemistry_write_particles(const struct part* parts, struct io_props* list) {
return 2; return 2;
} }
#ifdef HAVE_HDF5
/** /**
* @brief Writes the current model of SPH to the file * @brief Writes the current model of SPH to the file
* @param h_grp The HDF5 group in which to write * @param h_grp The HDF5 group in which to write
...@@ -76,5 +78,6 @@ void chemistry_write_flavour(hid_t h_grp) { ...@@ -76,5 +78,6 @@ void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s(h_grp, buffer, chemistry_get_element_name(i)); io_write_attribute_s(h_grp, buffer, chemistry_get_element_name(i));
} }
} }
#endif
#endif /* SWIFT_CHEMISTRY_IO_GEAR_H */ #endif /* SWIFT_CHEMISTRY_IO_GEAR_H */
...@@ -53,13 +53,16 @@ int chemistry_write_particles(const struct part* parts, struct io_props* list) { ...@@ -53,13 +53,16 @@ int chemistry_write_particles(const struct part* parts, struct io_props* list) {
return 0; return 0;
} }
#ifdef HAVE_HDF5
/** /**
* @brief Writes the current model of SPH to the file * @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write * @param h_grp The HDF5 group in which to write
*/ */
void chemistry_write_flavour(hid_t h_grpsph) { void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s(h_grpsph, "Chemistry Model", "None"); io_write_attribute_s(h_grp, "Chemistry Model", "None");
} }
#endif
#endif /* SWIFT_CHEMISTRY_IO_NONE_H */ #endif /* SWIFT_CHEMISTRY_IO_NONE_H */
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