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

Pass the cosmological parameters to the chemistry interaction functions.

parent cdf92cc4
Branches
Tags
1 merge request!509Cosmological time integration
...@@ -24,36 +24,38 @@ ...@@ -24,36 +24,38 @@
* @brief Smooth metal interaction functions following the EAGLE model. * @brief Smooth metal interaction functions following the EAGLE model.
*/ */
#include "chemistry_struct.h"
/** /**
* @brief Do chemistry computation after the runner_iact_density (symmetric * @brief do chemistry computation after the runner_iact_density (symmetric
* version) * version)
* *
* @param r2 Distance squared between particles * @param r2 Comoving square distance between the two particles.
* @param dx Distance between particles * @param dx Comoving vector separating both particles (pi - pj).
* @param hi Smoothing length of i * @param hi Comoving smoothing-length of particle i.
* @param hj Smoothing length of j * @param hj Comoving smoothing-length of particle j.
* @param pi #part i * @param pi First particle.
* @param pj #part j * @param pj Second particle.
* @param a Current scale factor.
* @param H Current Hubble parameter.
*/ */
__attribute__((always_inline)) INLINE static void runner_iact_chemistry( __attribute__((always_inline)) INLINE static void runner_iact_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, struct part *pj) { float r2, const float *dx, float hi, float hj, struct part *restrict pi,
} struct part *restrict pj, float a, float H) {}
/** /**
* @brief Do chemistry computation after the runner_iact_density (non-symmetric * @brief do chemistry computation after the runner_iact_density (non symmetric
* version) * version)
* *
* @param r2 Distance squared between particles * @param r2 Comoving square distance between the two particles.
* @param dx Distance between particles * @param dx Comoving vector separating both particles (pi - pj).
* @param hi Smoothing length of i * @param hi Comoving smoothing-length of particle i.
* @param hj Smoothing length of j * @param hj Comoving smoothing-length of particle j.
* @param pi #part i * @param pi First particle.
* @param pj #part j * @param pj Second particle (not updated).
* @param a Current scale factor.
* @param H Current Hubble parameter.
*/ */
__attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry( __attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, float r2, const float *dx, float hi, float hj, struct part *restrict pi,
const struct part *pj) {} const struct part *restrict pj, float a, float H) {}
#endif /* SWIFT_EAGLE_CHEMISTRY_IACT_H */ #endif /* SWIFT_EAGLE_CHEMISTRY_IACT_H */
...@@ -29,21 +29,22 @@ ...@@ -29,21 +29,22 @@
* al. 2009 * al. 2009
*/ */
#include "chemistry_struct.h"
/** /**
* @brief do chemistry computation after the runner_iact_density (symmetric * @brief do chemistry computation after the runner_iact_density (symmetric
* version) * version)
* *
* @param r2 Distance squared between particles * @param r2 Comoving square distance between the two particles.
* @param dx Distance between particles * @param dx Comoving vector separating both particles (pi - pj).
* @param hi Smoothing length of i * @param hi Comoving smoothing-length of particle i.
* @param hj Smoothing length of j * @param hj Comoving smoothing-length of particle j.
* @param pi #part i * @param pi First particle.
* @param pj #part j * @param pj Second particle.
* @param a Current scale factor.
* @param H Current Hubble parameter.
*/ */
__attribute__((always_inline)) INLINE static void runner_iact_chemistry( __attribute__((always_inline)) INLINE static void runner_iact_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, struct part *pj) { float r2, const float *dx, float hi, float hj, struct part *restrict pi,
struct part *restrict pj, float a, float H) {
struct chemistry_part_data *chi = &pi->chemistry_data; struct chemistry_part_data *chi = &pi->chemistry_data;
struct chemistry_part_data *chj = &pj->chemistry_data; struct chemistry_part_data *chj = &pj->chemistry_data;
...@@ -79,16 +80,18 @@ __attribute__((always_inline)) INLINE static void runner_iact_chemistry( ...@@ -79,16 +80,18 @@ __attribute__((always_inline)) INLINE static void runner_iact_chemistry(
* @brief do chemistry computation after the runner_iact_density (non symmetric * @brief do chemistry computation after the runner_iact_density (non symmetric
* version) * version)
* *
* @param r2 Distance squared between particles * @param r2 Comoving square distance between the two particles.
* @param dx Distance between particles * @param dx Comoving vector separating both particles (pi - pj).
* @param hi Smoothing length of i * @param hi Comoving smoothing-length of particle i.
* @param hj Smoothing length of j * @param hj Comoving smoothing-length of particle j.
* @param pi #part i * @param pi First particle.
* @param pj #part j * @param pj Second particle (not updated).
* @param a Current scale factor.
* @param H Current Hubble parameter.
*/ */
__attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry( __attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, float r2, const float *dx, float hi, float hj, struct part *restrict pi,
const struct part *pj) { const struct part *restrict pj, float a, float H) {
struct chemistry_part_data *chi = &pi->chemistry_data; struct chemistry_part_data *chi = &pi->chemistry_data;
const struct chemistry_part_data *chj = &pj->chemistry_data; const struct chemistry_part_data *chj = &pj->chemistry_data;
......
...@@ -25,38 +25,38 @@ ...@@ -25,38 +25,38 @@
* @brief Density computation * @brief Density computation
*/ */
#include "cache.h"
#include "chemistry_struct.h"
#include "minmax.h"
/** /**
* @brief do chemistry computation after the runner_iact_density (symmetric * @brief do chemistry computation after the runner_iact_density (symmetric
* version) * version)
* *
* @param r2 Distance squared between particles * @param r2 Comoving square distance between the two particles.
* @param dx Distance between particles * @param dx Comoving vector separating both particles (pi - pj).
* @param hi Smoothing length of i * @param hi Comoving smoothing-length of particle i.
* @param hj Smoothing length of j * @param hj Comoving smoothing-length of particle j.
* @param pi #part i * @param pi First particle.
* @param pj #part j * @param pj Second particle.
* @param a Current scale factor.
* @param H Current Hubble parameter.
*/ */
__attribute__((always_inline)) INLINE static void runner_iact_chemistry( __attribute__((always_inline)) INLINE static void runner_iact_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, struct part *pj) { float r2, const float *dx, float hi, float hj, struct part *restrict pi,
} struct part *restrict pj, float a, float H) {}
/** /**
* @brief do chemistry computation after the runner_iact_density (non symmetric * @brief do chemistry computation after the runner_iact_density (non symmetric
* version) * version)
* *
* @param r2 Distance squared between particles * @param r2 Comoving square distance between the two particles.
* @param dx Distance between particles * @param dx Comoving vector separating both particles (pi - pj).
* @param hi Smoothing length of i * @param hi Comoving smoothing-length of particle i.
* @param hj Smoothing length of j * @param hj Comoving smoothing-length of particle j.
* @param pi #part i * @param pi First particle.
* @param pj #part j * @param pj Second particle (not updated).
* @param a Current scale factor.
* @param H Current Hubble parameter.
*/ */
__attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry( __attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, float r2, const float *dx, float hi, float hj, struct part *restrict pi,
const struct part *pj) {} const struct part *restrict pj, float a, float H) {}
#endif /* SWIFT_NONE_CHEMISTRY_IACT_H */ #endif /* SWIFT_NONE_CHEMISTRY_IACT_H */
...@@ -204,7 +204,7 @@ void DOPAIR1_NAIVE(struct runner *r, struct cell *restrict ci, ...@@ -204,7 +204,7 @@ void DOPAIR1_NAIVE(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} }
if (r2 < hjg2 && pj_active) { if (r2 < hjg2 && pj_active) {
...@@ -215,7 +215,7 @@ void DOPAIR1_NAIVE(struct runner *r, struct cell *restrict ci, ...@@ -215,7 +215,7 @@ void DOPAIR1_NAIVE(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H); IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} }
...@@ -306,13 +306,13 @@ void DOPAIR2_NAIVE(struct runner *r, struct cell *restrict ci, ...@@ -306,13 +306,13 @@ void DOPAIR2_NAIVE(struct runner *r, struct cell *restrict ci,
IACT(r2, dx, hi, hj, pi, pj, a, H); IACT(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} else if (pi_active) { } else if (pi_active) {
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} else if (pj_active) { } else if (pj_active) {
...@@ -322,7 +322,7 @@ void DOPAIR2_NAIVE(struct runner *r, struct cell *restrict ci, ...@@ -322,7 +322,7 @@ void DOPAIR2_NAIVE(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H); IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} }
} }
...@@ -401,13 +401,13 @@ void DOSELF1_NAIVE(struct runner *r, struct cell *restrict c) { ...@@ -401,13 +401,13 @@ void DOSELF1_NAIVE(struct runner *r, struct cell *restrict c) {
IACT(r2, dx, hi, hj, pi, pj, a, H); IACT(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} else if (doi) { } else if (doi) {
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} else if (doj) { } else if (doj) {
...@@ -417,7 +417,7 @@ void DOSELF1_NAIVE(struct runner *r, struct cell *restrict c) { ...@@ -417,7 +417,7 @@ void DOSELF1_NAIVE(struct runner *r, struct cell *restrict c) {
IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H); IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} }
} /* loop over the parts in cj. */ } /* loop over the parts in cj. */
...@@ -495,13 +495,13 @@ void DOSELF2_NAIVE(struct runner *r, struct cell *restrict c) { ...@@ -495,13 +495,13 @@ void DOSELF2_NAIVE(struct runner *r, struct cell *restrict c) {
IACT(r2, dx, hi, hj, pi, pj, a, H); IACT(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} else if (doi) { } else if (doi) {
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} else if (doj) { } else if (doj) {
...@@ -511,7 +511,7 @@ void DOSELF2_NAIVE(struct runner *r, struct cell *restrict c) { ...@@ -511,7 +511,7 @@ void DOSELF2_NAIVE(struct runner *r, struct cell *restrict c) {
IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H); IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} }
} /* loop over the parts in cj. */ } /* loop over the parts in cj. */
...@@ -593,7 +593,7 @@ void DOPAIR_SUBSET_NAIVE(struct runner *r, struct cell *restrict ci, ...@@ -593,7 +593,7 @@ void DOPAIR_SUBSET_NAIVE(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hi, pj->h, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, pj->h, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, pj->h, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, pj->h, pi, pj, a, H);
#endif #endif
} }
} /* loop over the parts in cj. */ } /* loop over the parts in cj. */
...@@ -681,7 +681,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci, ...@@ -681,7 +681,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} }
} /* loop over the parts in cj. */ } /* loop over the parts in cj. */
...@@ -732,7 +732,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci, ...@@ -732,7 +732,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} }
} /* loop over the parts in cj. */ } /* loop over the parts in cj. */
...@@ -845,6 +845,7 @@ void DOSELF_SUBSET(struct runner *r, struct cell *restrict ci, ...@@ -845,6 +845,7 @@ void DOSELF_SUBSET(struct runner *r, struct cell *restrict ci,
/* Get a pointer to the jth particle. */ /* Get a pointer to the jth particle. */
struct part *restrict pj = &parts_j[pjd]; struct part *restrict pj = &parts_j[pjd];
const float hj = pj->h;
/* Compute the pairwise distance. */ /* Compute the pairwise distance. */
const float pjx[3] = {(float)(pj->x[0] - ci->loc[0]), const float pjx[3] = {(float)(pj->x[0] - ci->loc[0]),
...@@ -864,9 +865,9 @@ void DOSELF_SUBSET(struct runner *r, struct cell *restrict ci, ...@@ -864,9 +865,9 @@ void DOSELF_SUBSET(struct runner *r, struct cell *restrict ci,
/* Hit or miss? */ /* Hit or miss? */
if (r2 > 0.f && r2 < hig2) { if (r2 > 0.f && r2 < hig2) {
IACT_NONSYM(r2, dx, hi, pj->h, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, pj->h, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} }
} /* loop over the parts in cj. */ } /* loop over the parts in cj. */
...@@ -1022,7 +1023,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj, const int sid, ...@@ -1022,7 +1023,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} }
} /* loop over the parts in cj. */ } /* loop over the parts in cj. */
...@@ -1105,7 +1106,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj, const int sid, ...@@ -1105,7 +1106,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H); IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} }
} /* loop over the parts in ci. */ } /* loop over the parts in ci. */
...@@ -1376,7 +1377,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid, ...@@ -1376,7 +1377,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
if (r2 < hig2) { if (r2 < hig2) {
IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H); IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} }
} /* loop over the active parts in cj. */ } /* loop over the active parts in cj. */
...@@ -1441,12 +1442,12 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid, ...@@ -1441,12 +1442,12 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
if (part_is_active(pj, e)) { if (part_is_active(pj, e)) {
IACT(r2, dx, hi, hj, pi, pj, a, H); IACT(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} else { } else {
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} }
} }
...@@ -1536,7 +1537,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid, ...@@ -1536,7 +1537,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
if (r2 < hjg2 && r2 >= hig2) { if (r2 < hjg2 && r2 >= hig2) {
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} }
} /* loop over the active parts in ci. */ } /* loop over the active parts in ci. */
...@@ -1604,12 +1605,12 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid, ...@@ -1604,12 +1605,12 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
if (part_is_active(pi, e)) { if (part_is_active(pi, e)) {
IACT(r2, dx, hj, hi, pj, pi, a, H); IACT(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} else { } else {
IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H); IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} }
} }
...@@ -1783,7 +1784,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) { ...@@ -1783,7 +1784,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H); IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} }
} /* loop over all other particles. */ } /* loop over all other particles. */
...@@ -1827,12 +1828,12 @@ void DOSELF1(struct runner *r, struct cell *restrict c) { ...@@ -1827,12 +1828,12 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
if (r2 < hig2 && doj) { if (r2 < hig2 && doj) {
IACT(r2, dx, hi, hj, pi, pj, a, H); IACT(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} else if (!doj) { } else if (!doj) {
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} else { } else {
dx[0] = -dx[0]; dx[0] = -dx[0];
...@@ -1840,7 +1841,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) { ...@@ -1840,7 +1841,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
dx[2] = -dx[2]; dx[2] = -dx[2];
IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H); IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} }
} }
...@@ -1960,7 +1961,7 @@ void DOSELF2(struct runner *r, struct cell *restrict c) { ...@@ -1960,7 +1961,7 @@ void DOSELF2(struct runner *r, struct cell *restrict c) {
IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H); IACT_NONSYM(r2, dx, hj, hi, pj, pi, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi); runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, a, H);
#endif #endif
} }
} /* loop over all other particles. */ } /* loop over all other particles. */
...@@ -2002,12 +2003,12 @@ void DOSELF2(struct runner *r, struct cell *restrict c) { ...@@ -2002,12 +2003,12 @@ void DOSELF2(struct runner *r, struct cell *restrict c) {
if (part_is_active(pj, e)) { if (part_is_active(pj, e)) {
IACT(r2, dx, hi, hj, pi, pj, a, H); IACT(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} else { } else {
IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H); IACT_NONSYM(r2, dx, hi, hj, pi, pj, a, H);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY) #if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj); runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, a, H);
#endif #endif
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment