Commit 1a5338fa authored by lhausamm's avatar lhausamm
Browse files

Formating

parent d62733f6
......@@ -2424,7 +2424,7 @@ void cell_drift_part(struct cell *c, const struct engine *e, int force) {
/* Get ready for a density calculation */
if (part_is_active(p, e)) {
hydro_init_part(p, &e->s->hs);
chemistry_init_part(p, e->chemistry);
chemistry_init_part(p, e->chemistry);
}
}
......
......@@ -44,9 +44,8 @@ __attribute__((always_inline)) INLINE static const char*
chemistry_get_element_name(enum chemistry_element elem) {
static const char* chemistry_element_names[chemistry_element_count] = {
"Oxygen", "Magnesium", "Sulfur", "Iron",
"Zinc", "Strontium", "Yttrium", "Barium",
"Europium"};
"Oxygen", "Magnesium", "Sulfur", "Iron", "Zinc",
"Strontium", "Yttrium", "Barium", "Europium"};
return chemistry_element_names[elem];
}
......@@ -75,7 +74,6 @@ static INLINE void chemistry_print_backend(const struct chemistry_data* data) {
message("Chemistry function is 'Gear'.");
}
/**
* @brief Prepares a particle for the smooth metal calculation.
*
......@@ -86,20 +84,20 @@ static INLINE void chemistry_print_backend(const struct chemistry_data* data) {
* @param cd #chemistry_data containing chemistry informations.
*/
__attribute__((always_inline)) INLINE static void chemistry_init_part(
struct part *restrict p, const struct chemistry_data *cd) {
struct part* restrict p, const struct chemistry_data* cd) {
struct chemistry_part_data *cpd = &p->chemistry_data;
struct chemistry_part_data* cpd = &p->chemistry_data;
for(int i=0; i < chemistry_element_count; i++) {
for (int i = 0; i < chemistry_element_count; i++) {
cpd->smoothed_metal_mass_fraction[i] = 0.f;
}
}
/**
* @brief Finishes the smooth metal calculation.
*
* Multiplies the smoothed metallicity and number of neighbours by the appropiate constants
* Multiplies the smoothed metallicity and number of neighbours by the
* appropiate constants
* and add the self-contribution term.
*
* This method requires the #hydro_end_density to have been computed.
......@@ -107,7 +105,7 @@ __attribute__((always_inline)) INLINE static void chemistry_init_part(
* @param p The particle to act upon
*/
__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) {
/* Some smoothing length multiples. */
const float h = p->h;
......@@ -115,18 +113,18 @@ __attribute__((always_inline)) INLINE static void chemistry_end_density(
const float factor = pow_dimension(h_inv) / p->rho; /* 1 / h^d * rho */
const float m = p->mass;
struct chemistry_part_data *cpd = &p->chemistry_data;
struct chemistry_part_data* cpd = &p->chemistry_data;
for(int i=0; i < chemistry_element_count; i++) {
for (int i = 0; i < chemistry_element_count; i++) {
/* Final operation on the density (add self-contribution). */
cpd->smoothed_metal_mass_fraction[i] += m * cpd->metal_mass_fraction[i]* kernel_root;
cpd->smoothed_metal_mass_fraction[i] +=
m * cpd->metal_mass_fraction[i] * kernel_root;
/* Finish the calculation by inserting the missing h-factors */
cpd->smoothed_metal_mass_fraction[i] *= factor;
}
}
/**
* @brief Sets the chemistry properties of the (x-)particles to a valid start
* state.
......
......@@ -22,17 +22,20 @@
/**
* @file GEAR/chemistry_iact.h
* @brief Smooth metal interaction functions following the GEAR version of smooth metalicity.
* @brief Smooth metal interaction functions following the GEAR version of
* smooth metalicity.
*
* The interactions computed here are the ones presented in Wiersma, Schaye et al. 2009
* The interactions computed here are the ones presented in Wiersma, Schaye et
* al. 2009
*/
#include "cache.h"
#include "minmax.h"
#include "chemistry_struct.h"
#include "minmax.h"
/**
* @brief do chemistry computation after the runner_iact_density (symmetric version)
* @brief do chemistry computation after the runner_iact_density (symmetric
* version)
*
* @param r2 Distance squared between particles
* @param dx Distance between particles
......@@ -43,8 +46,8 @@
* @param chem_data Chemistry informations
*/
__attribute__((always_inline)) INLINE static void runner_iact_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, struct part *pj,
const struct chemistry_data *chem_data) {
float r2, float *dx, float hi, float hj, struct part *pi, struct part *pj,
const struct chemistry_data *chem_data) {
struct chemistry_part_data *chi = &pi->chemistry_data;
struct chemistry_part_data *chj = &pj->chemistry_data;
......@@ -68,14 +71,17 @@ const struct chemistry_data *chem_data) {
kernel_deval(uj, &wj, &wj_dx);
/* Compute contribution to the smooth metallicity */
for(int i=0; i < chemistry_element_count; i++) {
chi->smoothed_metal_mass_fraction[i] += mj * chj->metal_mass_fraction[i] * wi;
chj->smoothed_metal_mass_fraction[i] += mi * chi->metal_mass_fraction[i] * wj;
for (int i = 0; i < chemistry_element_count; i++) {
chi->smoothed_metal_mass_fraction[i] +=
mj * chj->metal_mass_fraction[i] * wi;
chj->smoothed_metal_mass_fraction[i] +=
mi * chi->metal_mass_fraction[i] * wj;
}
}
/**
* @brief do chemistry computation after the runner_iact_density (non symmetric version)
* @brief do chemistry computation after the runner_iact_density (non symmetric
* version)
*
* @param r2 Distance squared between particles
* @param dx Distance between particles
......@@ -86,8 +92,8 @@ const struct chemistry_data *chem_data) {
* @param chem_data Chemistry informations
*/
__attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, const struct part *pj,
const struct chemistry_data *chem_data) {
float r2, float *dx, float hi, float hj, struct part *pi,
const struct part *pj, const struct chemistry_data *chem_data) {
struct chemistry_part_data *chi = &pi->chemistry_data;
const struct chemistry_part_data *chj = &pj->chemistry_data;
......@@ -105,12 +111,10 @@ const struct chemistry_data *chem_data) {
kernel_deval(ui, &wi, &wi_dx);
/* Compute contribution to the smooth metallicity */
for(int i=0; i < chemistry_element_count; i++) {
chi->smoothed_metal_mass_fraction[i] += mj * chj->metal_mass_fraction[i] * wi;
for (int i = 0; i < chemistry_element_count; i++) {
chi->smoothed_metal_mass_fraction[i] +=
mj * chj->metal_mass_fraction[i] * wi;
}
}
#endif /* SWIFT_GEAR_CHEMISTRY_IACT_H */
......@@ -19,9 +19,9 @@
#ifndef SWIFT_CHEMISTRY_IO_GEAR_H
#define SWIFT_CHEMISTRY_IO_GEAR_H
#include "io_properties.h"
#include "chemistry_struct.h"
#include "chemistry.h"
#include "chemistry_struct.h"
#include "io_properties.h"
/**
* @brief Specifies which particle fields to read from a dataset
......@@ -34,10 +34,9 @@
int chemistry_read_particles(struct part* parts, struct io_props* list) {
/* List what we want to read */
list[0] =
io_make_input_field("ElementAbundance", FLOAT, chemistry_element_count, OPTIONAL,
UNIT_CONV_NO_UNITS,
parts, chemistry_data.metal_mass_fraction);
list[0] = io_make_input_field(
"ElementAbundance", FLOAT, chemistry_element_count, OPTIONAL,
UNIT_CONV_NO_UNITS, parts, chemistry_data.metal_mass_fraction);
return 1;
}
......@@ -52,13 +51,13 @@ int chemistry_read_particles(struct part* parts, struct io_props* list) {
int chemistry_write_particles(const struct part* parts, struct io_props* list) {
/* List what we want to write */
list[0] = io_make_output_field("SmoothedElementAbundance", FLOAT, chemistry_element_count,
UNIT_CONV_NO_UNITS,
parts, chemistry_data.smoothed_metal_mass_fraction);
list[0] = io_make_output_field(
"SmoothedElementAbundance", FLOAT, chemistry_element_count,
UNIT_CONV_NO_UNITS, parts, chemistry_data.smoothed_metal_mass_fraction);
list[1] = io_make_output_field("ElementAbundance", FLOAT, chemistry_element_count,
UNIT_CONV_NO_UNITS,
parts, chemistry_data.metal_mass_fraction);
list[1] = io_make_output_field("ElementAbundance", FLOAT,
chemistry_element_count, UNIT_CONV_NO_UNITS,
parts, chemistry_data.metal_mass_fraction);
return 2;
}
......@@ -70,7 +69,7 @@ int chemistry_write_particles(const struct part* parts, struct io_props* list) {
void chemistry_write_flavour(hid_t h_grp) {
io_write_attribute_s(h_grp, "Chemistry Model", "GEAR");
for(size_t i=0; i < chemistry_element_count; i++) {
for (size_t i = 0; i < chemistry_element_count; i++) {
char buffer[20];
sprintf(buffer, "Element %lu", i);
io_write_attribute_s(h_grp, buffer, chemistry_get_element_name(i));
......
......@@ -32,7 +32,8 @@ enum chemistry_element {
chemistry_element_Y,
chemistry_element_Ba,
chemistry_element_Eu,
chemistry_element_count};
chemistry_element_count
};
/**
* @brief Global chemical abundance information.
......@@ -49,7 +50,6 @@ struct chemistry_part_data {
/*! Smoothed fraction of the particle mass in a given element */
float smoothed_metal_mass_fraction[chemistry_element_count];
};
#endif /* SWIFT_CHEMISTRY_STRUCT_GEAR_H */
......@@ -43,26 +43,11 @@
__attribute__((always_inline)) INLINE static const char*
chemistry_get_element_name(enum chemistry_element elem) {
static const char* chemistry_element_names[chemistry_element_count] = {
};
static const char* chemistry_element_names[chemistry_element_count] = {};
return chemistry_element_names[elem];
}
/**
* @brief Sets the chemistry properties of the (x-)particles to a valid start
* state.
*
* Nothing to do here.
*
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data.
* @param data The global chemistry information used for this run.
*/
__attribute__((always_inline)) INLINE static void chemistry_first_init_part(
const struct part* restrict p, struct xpart* restrict xp,
const struct chemistry_data* data) {}
/**
* @brief Initialises the chemistry properties.
*
......@@ -93,8 +78,7 @@ static INLINE void chemistry_print_backend(const struct chemistry_data* data) {
* @param p The particle to act upon
*/
__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) {}
/**
* @brief Sets the chemistry properties of the (x-)particles to a valid start
......@@ -104,10 +88,23 @@ __attribute__((always_inline)) INLINE static void chemistry_end_density(
*
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data.
* @param data The global chemistry information.
* @param data The global chemistry information used for this run.
*/
__attribute__((always_inline)) INLINE static void chemistry_first_init_part(
struct part* restrict p, struct xpart* restrict xp,
const struct part* restrict p, struct xpart* restrict xp,
const struct chemistry_data* data) {}
/**
* @brief Sets the chemistry properties of the (x-)particles to a valid start
* state.
*
* Nothing to do here.
*
* @param p Pointer to the particle data.
* @param xp Pointer to the extended particle data.
* @param data The global chemistry information.
*/
__attribute__((always_inline)) INLINE static void chemistry_init_part(
struct part* restrict p, const struct chemistry_data* data) {}
#endif /* SWIFT_CHEMISTRY_NONE_H */
......@@ -26,11 +26,12 @@
*/
#include "cache.h"
#include "minmax.h"
#include "chemistry_struct.h"
#include "minmax.h"
/**
* @brief do chemistry computation after the runner_iact_density (symmetric version)
* @brief do chemistry computation after the runner_iact_density (symmetric
* version)
*
* @param r2 Distance squared between particles
* @param dx Distance between particles
......@@ -41,11 +42,12 @@
* @param chem_data Chemistry informations
*/
__attribute__((always_inline)) INLINE static void runner_iact_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, struct part *pj,
const struct chemistry_data *chem_data) {}
float r2, float *dx, float hi, float hj, struct part *pi, struct part *pj,
const struct chemistry_data *chem_data) {}
/**
* @brief do chemistry computation after the runner_iact_density (non symmetric version)
* @brief do chemistry computation after the runner_iact_density (non symmetric
* version)
*
* @param r2 Distance squared between particles
* @param dx Distance between particles
......@@ -56,9 +58,7 @@ const struct chemistry_data *chem_data) {}
* @param chem_data Chemistry informations
*/
__attribute__((always_inline)) INLINE static void runner_iact_nonsym_chemistry(
float r2, float *dx, float hi, float hj, struct part *pi, const struct part *pj,
const struct chemistry_data *chem_data) {}
float r2, float *dx, float hi, float hj, struct part *pi,
const struct part *pj, const struct chemistry_data *chem_data) {}
#endif /* SWIFT_NONE_CHEMISTRY_IACT_H */
......@@ -701,7 +701,7 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
/* Finish the density calculation */
hydro_end_density(p);
chemistry_end_density(p, e->chemistry);
chemistry_end_density(p, e->chemistry);
/* Compute one step of the Newton-Raphson scheme */
const float n_sum = p->density.wcount * h_old_dim;
......@@ -739,7 +739,7 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
/* Re-initialise everything */
hydro_init_part(p, &s->hs);
chemistry_init_part(p, e->chemistry);
chemistry_init_part(p, e->chemistry);
/* Off we go ! */
continue;
......
......@@ -202,7 +202,7 @@ void DOPAIR1_NAIVE(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
}
if (r2 < hjg2 && pj_active) {
......@@ -213,7 +213,7 @@ void DOPAIR1_NAIVE(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
......@@ -298,13 +298,13 @@ void DOPAIR2_NAIVE(struct runner *r, struct cell *restrict ci,
IACT(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
} else if (pi_active) {
IACT_NONSYM(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
} else if (pj_active) {
......@@ -314,7 +314,7 @@ void DOPAIR2_NAIVE(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
}
......@@ -386,13 +386,13 @@ void DOSELF1_NAIVE(struct runner *r, struct cell *restrict c) {
IACT(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
} else if (doi) {
IACT_NONSYM(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
} else if (doj) {
......@@ -402,7 +402,7 @@ void DOSELF1_NAIVE(struct runner *r, struct cell *restrict c) {
IACT_NONSYM(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
} /* loop over the parts in cj. */
......@@ -473,13 +473,13 @@ void DOSELF2_NAIVE(struct runner *r, struct cell *restrict c) {
IACT(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
} else if (doi) {
IACT_NONSYM(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
} else if (doj) {
......@@ -489,7 +489,7 @@ void DOSELF2_NAIVE(struct runner *r, struct cell *restrict c) {
IACT_NONSYM(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
} /* loop over the parts in cj. */
......@@ -565,7 +565,8 @@ void DOPAIR_SUBSET_NAIVE(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hi, pj->h, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, pj->h, pi, pj, r->e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, pj->h, pi, pj,
r->e->chemistry);
#endif
}
} /* loop over the parts in cj. */
......@@ -646,7 +647,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, r->e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, r->e->chemistry);
#endif
}
} /* loop over the parts in cj. */
......@@ -697,7 +698,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, r->e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, r->e->chemistry);
#endif
}
} /* loop over the parts in cj. */
......@@ -826,7 +827,8 @@ void DOSELF_SUBSET(struct runner *r, struct cell *restrict ci,
IACT_NONSYM(r2, dx, hi, pj->h, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, pj->h, pi, pj, r->e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, pj->h, pi, pj,
r->e->chemistry);
#endif
}
} /* loop over the parts in cj. */
......@@ -977,7 +979,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
IACT_NONSYM(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
}
} /* loop over the parts in cj. */
......@@ -1060,7 +1062,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
IACT_NONSYM(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
} /* loop over the parts in ci. */
......@@ -1326,7 +1328,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
if (r2 < hig2) {
IACT_NONSYM(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
} /* loop over the active parts in cj. */
......@@ -1389,17 +1391,16 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
/* Does pj need to be updated too? */
if (part_is_active(pj, e)) {
IACT(r2, dx, hi, hj, pi, pj);
IACT(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
}
else {
} else {
IACT_NONSYM(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
}
}
}
} /* loop over the parts in cj. */
} /* Is pi active? */
......@@ -1487,7 +1488,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
if (r2 < hjg2 && r2 >= hig2) {
IACT_NONSYM(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
}
} /* loop over the active parts in ci. */
......@@ -1555,15 +1556,14 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj, const int sid,
if (part_is_active(pi, e)) {
IACT(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
else {
} else {
IACT_NONSYM(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
}
}
} /* loop over the parts in ci. */
} /* Is pj active? */
......@@ -1730,7 +1730,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
IACT_NONSYM(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
} /* loop over all other particles. */
......@@ -1774,22 +1774,20 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
if (r2 < hig2 && doj) {
IACT(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
}
else if (!doj) {
} else if (!doj) {
IACT_NONSYM(r2, dx, hi, hj, pi, pj);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hi, hj, pi, pj, e->chemistry);
#endif
}
else {
} else {
dx[0] = -dx[0];
dx[1] = -dx[1];
dx[2] = -dx[2];
IACT_NONSYM(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
}
......@@ -1904,7 +1902,7 @@ void DOSELF2(struct runner *r, struct cell *restrict c) {
IACT_NONSYM(r2, dx, hj, hi, pj, pi);
#if (FUNCTION_TASK_LOOP == TASK_LOOP_DENSITY)
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
runner_iact_nonsym_chemistry(r2, dx, hj, hi, pj, pi, e->chemistry);
#endif
}
} /* loop over all other particles. */
......@@ -1946,15 +1944,14 @@ void DOSELF2(struct runner *r, struct cell *restrict c) {