From dd882b93d7475945245655d4bb315d3b47db5921 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Wed, 28 Feb 2018 11:52:30 +0000
Subject: [PATCH] Also pass the cosmological model to the
 chemistry_end_density() function

---
 src/chemistry/gear/chemistry.h | 4 +++-
 src/runner.c                   | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/chemistry/gear/chemistry.h b/src/chemistry/gear/chemistry.h
index 5dc7a48939..e9d3d00feb 100644
--- a/src/chemistry/gear/chemistry.h
+++ b/src/chemistry/gear/chemistry.h
@@ -103,9 +103,11 @@ __attribute__((always_inline)) INLINE static void chemistry_init_part(
  *
  * @param p The particle to act upon.
  * @param cd #chemistry_data containing chemistry informations.
+ * @param cosmo The current cosmological model.
  */
 __attribute__((always_inline)) INLINE static void chemistry_end_density(
-    struct part* restrict p, const struct chemistry_data* cd) {
+    struct part* restrict p, const struct chemistry_data* cd,
+    const struct cosmology* cosmo) {
 
   /* Some smoothing length multiples. */
   const float h = p->h;
diff --git a/src/runner.c b/src/runner.c
index e32d20a208..fb74b20564 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -756,7 +756,7 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
 
             /* Re-initialise everything */
             hydro_init_part(p, hs);
-            chemistry_init_part(p, e->chemistry);
+            chemistry_init_part(p, chemistry);
 
             /* Off we go ! */
             continue;
-- 
GitLab