From 80b438f32b41ab6c088d62d6b3d7b322ec826c77 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Sat, 12 Oct 2019 18:06:46 +0200
Subject: [PATCH] Updated the signature of cooling_init_backend() to match the
 needs of the COLIBRE fork.

---
 src/cooling.c                      | 2 +-
 src/cooling/Compton/cooling.h      | 2 ++
 src/cooling/EAGLE/cooling.c        | 2 ++
 src/cooling/EAGLE/cooling.h        | 1 +
 src/cooling/const_du/cooling.h     | 2 ++
 src/cooling/const_lambda/cooling.h | 2 ++
 src/cooling/grackle/cooling.h      | 3 ++-
 src/cooling/none/cooling.h         | 2 ++
 8 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/cooling.c b/src/cooling.c
index b2a711bcda..563485e97e 100644
--- a/src/cooling.c
+++ b/src/cooling.c
@@ -51,7 +51,7 @@ void cooling_init(struct swift_params* parameter_file,
         "ERROR: Cannot run with cooling switched on and no minimal "
         "temperature.");
 
-  cooling_init_backend(parameter_file, us, phys_const, cooling);
+  cooling_init_backend(parameter_file, us, phys_const, hydro_props, cooling);
 }
 
 /**
diff --git a/src/cooling/Compton/cooling.h b/src/cooling/Compton/cooling.h
index 9e5a5ad34a..e04fc6f9ad 100644
--- a/src/cooling/Compton/cooling.h
+++ b/src/cooling/Compton/cooling.h
@@ -314,11 +314,13 @@ __attribute__((always_inline)) INLINE static float cooling_get_radiated_energy(
  * @param parameter_file The parsed parameter file.
  * @param us The current internal system of units.
  * @param phys_const The physical constants in internal units.
+ * @param hydro_props The properties of the hydro scheme.
  * @param cooling The cooling properties to initialize
  */
 static INLINE void cooling_init_backend(struct swift_params* parameter_file,
                                         const struct unit_system* us,
                                         const struct phys_const* phys_const,
+                                        const struct hydro_props* hydro_props,
                                         struct cooling_function_data* cooling) {
 
   /* Some useful conversion values */
diff --git a/src/cooling/EAGLE/cooling.c b/src/cooling/EAGLE/cooling.c
index c5595ef514..a228eb6ee7 100644
--- a/src/cooling/EAGLE/cooling.c
+++ b/src/cooling/EAGLE/cooling.c
@@ -683,11 +683,13 @@ void cooling_Hydrogen_reionization(const struct cooling_function_data *cooling,
  * @param parameter_file The parsed parameter file
  * @param us Internal system of units data structure
  * @param phys_const #phys_const data structure
+ * @param hydro_props The properties of the hydro scheme.
  * @param cooling #cooling_function_data struct to initialize
  */
 void cooling_init_backend(struct swift_params *parameter_file,
                           const struct unit_system *us,
                           const struct phys_const *phys_const,
+                          const struct hydro_props *hydro_props,
                           struct cooling_function_data *cooling) {
 
   /* Read model parameters */
diff --git a/src/cooling/EAGLE/cooling.h b/src/cooling/EAGLE/cooling.h
index eac3425d25..f154df3136 100644
--- a/src/cooling/EAGLE/cooling.h
+++ b/src/cooling/EAGLE/cooling.h
@@ -78,6 +78,7 @@ void cooling_Hydrogen_reionization(const struct cooling_function_data *cooling,
 void cooling_init_backend(struct swift_params *parameter_file,
                           const struct unit_system *us,
                           const struct phys_const *phys_const,
+                          const struct hydro_props *hydro_props,
                           struct cooling_function_data *cooling);
 
 void cooling_print_backend(const struct cooling_function_data *cooling);
diff --git a/src/cooling/const_du/cooling.h b/src/cooling/const_du/cooling.h
index c57ef4a687..386ad3e001 100644
--- a/src/cooling/const_du/cooling.h
+++ b/src/cooling/const_du/cooling.h
@@ -235,11 +235,13 @@ __attribute__((always_inline)) INLINE static float cooling_get_radiated_energy(
  * @param parameter_file The parsed parameter file.
  * @param us The current internal system of units.
  * @param phys_const The physical constants in internal units.
+ * @param hydro_props The properties of the hydro scheme.
  * @param cooling The cooling properties to initialize
  */
 static INLINE void cooling_init_backend(struct swift_params* parameter_file,
                                         const struct unit_system* us,
                                         const struct phys_const* phys_const,
+                                        const struct hydro_props* hydro_props,
                                         struct cooling_function_data* cooling) {
 
   cooling->cooling_rate =
diff --git a/src/cooling/const_lambda/cooling.h b/src/cooling/const_lambda/cooling.h
index fddc9a6206..3e3a44249d 100644
--- a/src/cooling/const_lambda/cooling.h
+++ b/src/cooling/const_lambda/cooling.h
@@ -308,11 +308,13 @@ __attribute__((always_inline)) INLINE static float cooling_get_radiated_energy(
  * @param parameter_file The parsed parameter file.
  * @param us The current internal system of units.
  * @param phys_const The physical constants in internal units.
+ * @param hydro_props The properties of the hydro scheme.
  * @param cooling The cooling properties to initialize
  */
 static INLINE void cooling_init_backend(struct swift_params* parameter_file,
                                         const struct unit_system* us,
                                         const struct phys_const* phys_const,
+                                        const struct hydro_props* hydro_props,
                                         struct cooling_function_data* cooling) {
 
   /* Read in the cooling parameters */
diff --git a/src/cooling/grackle/cooling.h b/src/cooling/grackle/cooling.h
index 98d34dc630..dec0e80ffa 100644
--- a/src/cooling/grackle/cooling.h
+++ b/src/cooling/grackle/cooling.h
@@ -852,11 +852,12 @@ __attribute__((always_inline)) INLINE static void cooling_init_grackle(
  * @param parameter_file The parsed parameter file.
  * @param us The current internal system of units.
  * @param phys_const The physical constants in internal units.
+ * @param hydro_props The properties of the hydro scheme.
  * @param cooling The cooling properties to initialize
  */
 __attribute__((always_inline)) INLINE static void cooling_init_backend(
     struct swift_params* parameter_file, const struct unit_system* us,
-    const struct phys_const* phys_const,
+    const struct phys_const* phys_const, const struct hydro_props* hydro_props,
     struct cooling_function_data* cooling) {
 
   if (GRACKLE_NPART != 1)
diff --git a/src/cooling/none/cooling.h b/src/cooling/none/cooling.h
index 20aef187d9..5630914dea 100644
--- a/src/cooling/none/cooling.h
+++ b/src/cooling/none/cooling.h
@@ -184,11 +184,13 @@ __attribute__((always_inline)) INLINE static float cooling_get_radiated_energy(
  * @param parameter_file The parsed parameter file.
  * @param us The current internal system of units.
  * @param phys_const The physical constants in internal units.
+ * @param hydro_props The properties of the hydro scheme.
  * @param cooling The cooling properties to initialize
  */
 static INLINE void cooling_init_backend(struct swift_params* parameter_file,
                                         const struct unit_system* us,
                                         const struct phys_const* phys_const,
+                                        const struct hydro_props* hydro_props,
                                         struct cooling_function_data* cooling) {
 }
 
-- 
GitLab