From c76de762c770d97e06ccba119e43777d640158cc Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Tue, 29 Jan 2019 15:06:50 +1100
Subject: [PATCH] Make the EAGLE chemistry interaction functions only compute W
 and not also dW/dr as it is not required.

---
 src/chemistry/EAGLE/chemistry_iact.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/chemistry/EAGLE/chemistry_iact.h b/src/chemistry/EAGLE/chemistry_iact.h
index 5200facdc4..07891b28bb 100644
--- a/src/chemistry/EAGLE/chemistry_iact.h
+++ b/src/chemistry/EAGLE/chemistry_iact.h
@@ -44,8 +44,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_chemistry(
   struct chemistry_part_data *chi = &pi->chemistry_data;
   struct chemistry_part_data *chj = &pj->chemistry_data;
 
-  float wi, wi_dx;
-  float wj, wj_dx;
+  float wi;
+  float wj;
 
   /* Get the masses. */
   const float mi = pi->mass;
@@ -56,11 +56,11 @@ __attribute__((always_inline)) INLINE static void runner_iact_chemistry(
 
   /* Compute the kernel function for pi */
   const float ui = r / hi;
-  kernel_deval(ui, &wi, &wi_dx);
+  kernel_eval(ui, &wi);
 
   /* Compute the kernel function for pj */
   const float uj = r / hj;
-  kernel_deval(uj, &wj, &wj_dx);
+  kernel_eval(uj, &wj);
 
   /* Compute contribution to the smooth metallicity */
   for (int i = 0; i < chemistry_element_count; i++) {
@@ -103,7 +103,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry(
   struct chemistry_part_data *chi = &pi->chemistry_data;
   const struct chemistry_part_data *chj = &pj->chemistry_data;
 
-  float wi, wi_dx;
+  float wi;
 
   /* Get the masses. */
   const float mj = pj->mass;
@@ -113,7 +113,7 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry(
 
   /* Compute the kernel function for pi */
   const float ui = r / hi;
-  kernel_deval(ui, &wi, &wi_dx);
+  kernel_eval(ui, &wi);
 
   /* Compute contribution to the smooth metallicity */
   for (int i = 0; i < chemistry_element_count; i++) {
-- 
GitLab