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

Only compile the cooling_write_flavour() functions if HDF5 is detected.

parent bccd9547
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#include "physical_constants.h" #include "physical_constants.h"
#include "units.h" #include "units.h"
#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
...@@ -46,6 +48,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour( ...@@ -46,6 +48,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour(
io_write_attribute_s(h_grpsph, "Cooling Model", "EAGLE"); io_write_attribute_s(h_grpsph, "Cooling Model", "EAGLE");
} }
#endif
/** /**
* @brief Apply the cooling function to a particle. * @brief Apply the cooling function to a particle.
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
#include "physical_constants.h" #include "physical_constants.h"
#include "units.h" #include "units.h"
#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
...@@ -53,6 +55,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour( ...@@ -53,6 +55,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour(
io_write_attribute_s(h_grpsph, "Cooling Model", "Constant du/dt"); io_write_attribute_s(h_grpsph, "Cooling Model", "Constant du/dt");
} }
#endif
/** /**
* @brief Apply the cooling function to a particle. * @brief Apply the cooling function to a particle.
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#include "physical_constants.h" #include "physical_constants.h"
#include "units.h" #include "units.h"
#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
...@@ -46,6 +48,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour( ...@@ -46,6 +48,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour(
io_write_attribute_s(h_grpsph, "Cooling Model", "Constant Lambda"); io_write_attribute_s(h_grpsph, "Cooling Model", "Constant Lambda");
} }
#endif
/** /**
* @brief Calculates du/dt in code units for a particle. * @brief Calculates du/dt in code units for a particle.
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#define GRACKLE_NPART 1 #define GRACKLE_NPART 1
#define GRACKLE_RANK 3 #define GRACKLE_RANK 3
#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
...@@ -51,6 +53,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour( ...@@ -51,6 +53,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour(
io_write_attribute_s(h_grpsph, "Cooling Model", "Grackle"); io_write_attribute_s(h_grpsph, "Cooling Model", "Grackle");
} }
#endif
/** /**
* @brief Sets the cooling properties of the (x-)particles to a valid start * @brief Sets the cooling properties of the (x-)particles to a valid start
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#include "physical_constants.h" #include "physical_constants.h"
#include "units.h" #include "units.h"
#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
...@@ -46,6 +48,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour( ...@@ -46,6 +48,7 @@ __attribute__((always_inline)) INLINE static void cooling_write_flavour(
io_write_attribute_s(h_grpsph, "Cooling Model", "None"); io_write_attribute_s(h_grpsph, "Cooling Model", "None");
} }
#endif
/** /**
* @brief Apply the cooling function to a particle. * @brief Apply the cooling function to a particle.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment