Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
94969fd6
Commit
94969fd6
authored
Mar 01, 2018
by
Matthieu Schaller
Browse files
Only compile the functions printing the chemistry models to snapshots if HDF5 is detected.
parent
6ebe6eb1
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/chemistry/EAGLE/chemistry_io.h
View file @
94969fd6
...
...
@@ -95,6 +95,8 @@ int chemistry_write_particles(const struct part* parts, struct io_props* list) {
return
12
;
}
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grpsph The HDF5 group in which to write
...
...
@@ -108,5 +110,6 @@ void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s
(
h_grp
,
buffer
,
chemistry_get_element_name
(
elem
));
}
}
#endif
#endif
/* SWIFT_CHEMISTRY_IO_EAGLE_H */
src/chemistry/gear/chemistry_io.h
View file @
94969fd6
...
...
@@ -62,6 +62,8 @@ int chemistry_write_particles(const struct part* parts, struct io_props* list) {
return
2
;
}
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grp The HDF5 group in which to write
...
...
@@ -76,5 +78,6 @@ void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s
(
h_grp
,
buffer
,
chemistry_get_element_name
(
i
));
}
}
#endif
#endif
/* SWIFT_CHEMISTRY_IO_GEAR_H */
src/chemistry/none/chemistry_io.h
View file @
94969fd6
...
...
@@ -53,13 +53,16 @@ int chemistry_write_particles(const struct part* parts, struct io_props* list) {
return
0
;
}
#ifdef HAVE_HDF5
/**
* @brief Writes the current model of SPH to the file
* @param h_grp
sph
The HDF5 group in which to write
* @param h_grp The HDF5 group in which to write
*/
void
chemistry_write_flavour
(
hid_t
h_grp
sph
)
{
void
chemistry_write_flavour
(
hid_t
h_grp
)
{
io_write_attribute_s
(
h_grp
sph
,
"Chemistry Model"
,
"None"
);
io_write_attribute_s
(
h_grp
,
"Chemistry Model"
,
"None"
);
}
#endif
#endif
/* SWIFT_CHEMISTRY_IO_NONE_H */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment