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

Enforce more const-correctness in the BH interaction routines.

parent 2c9335f0
No related branches found
No related tags found
1 merge request!863Black holes mergers
...@@ -85,7 +85,7 @@ runner_iact_nonsym_bh_gas_density(const float r2, const float *dx, ...@@ -85,7 +85,7 @@ runner_iact_nonsym_bh_gas_density(const float r2, const float *dx,
__attribute__((always_inline)) INLINE static void __attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx, runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
const float hi, const float hj, const float hi, const float hj,
struct bpart *restrict bi, const struct bpart *restrict bi,
struct part *restrict pj, struct part *restrict pj,
struct xpart *restrict xpj, struct xpart *restrict xpj,
const struct cosmology *cosmo, const struct cosmology *cosmo,
...@@ -109,7 +109,7 @@ runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx, ...@@ -109,7 +109,7 @@ runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
__attribute__((always_inline)) INLINE static void __attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx, runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
const float hi, const float hj, const float hi, const float hj,
struct bpart *restrict bi, const struct bpart *restrict bi,
struct bpart *restrict bj, struct bpart *restrict bj,
const struct cosmology *cosmo, const struct cosmology *cosmo,
const integertime_t ti_current) {} const integertime_t ti_current) {}
...@@ -132,7 +132,7 @@ runner_iact_nonsym_bh_gas_feedback(const float r2, const float *dx, ...@@ -132,7 +132,7 @@ runner_iact_nonsym_bh_gas_feedback(const float r2, const float *dx,
const float hi, const float hj, const float hi, const float hj,
struct bpart *restrict bi, struct bpart *restrict bi,
struct part *restrict pj, struct part *restrict pj,
const struct xpart *restrict xpj, struct xpart *restrict xpj,
const struct cosmology *cosmo, const struct cosmology *cosmo,
const integertime_t ti_current) { const integertime_t ti_current) {
#ifdef DEBUG_INTERACTIONS_BH #ifdef DEBUG_INTERACTIONS_BH
......
...@@ -122,7 +122,7 @@ runner_iact_nonsym_bh_gas_density(const float r2, const float *dx, ...@@ -122,7 +122,7 @@ runner_iact_nonsym_bh_gas_density(const float r2, const float *dx,
__attribute__((always_inline)) INLINE static void __attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx, runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
const float hi, const float hj, const float hi, const float hj,
struct bpart *restrict bi, const struct bpart *restrict bi,
struct part *restrict pj, struct part *restrict pj,
struct xpart *restrict xpj, struct xpart *restrict xpj,
const struct cosmology *cosmo, const struct cosmology *cosmo,
...@@ -193,7 +193,7 @@ runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx, ...@@ -193,7 +193,7 @@ runner_iact_nonsym_bh_gas_swallow(const float r2, const float *dx,
__attribute__((always_inline)) INLINE static void __attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx, runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
const float hi, const float hj, const float hi, const float hj,
struct bpart *restrict bi, const struct bpart *restrict bi,
struct bpart *restrict bj, struct bpart *restrict bj,
const struct cosmology *cosmo, const struct cosmology *cosmo,
const integertime_t ti_current) { const integertime_t ti_current) {
...@@ -207,7 +207,7 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx, ...@@ -207,7 +207,7 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
const float v2_pec = v2 * cosmo->a2_inv; const float v2_pec = v2 * cosmo->a2_inv;
/* Find the bigger of the two BHs */ /* Find the most massive of the two BHs */
float M = bi->subgrid_mass; float M = bi->subgrid_mass;
float h = hi; float h = hi;
if (bj->subgrid_mass > M) { if (bj->subgrid_mass > M) {
...@@ -215,7 +215,7 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx, ...@@ -215,7 +215,7 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
h = hj; h = hj;
} }
const float G = 43.; const float G = 43.; // MATTHIEU: Fix this!!!
/* Merge if gravitationally bound /* Merge if gravitationally bound
* Note that we use the kernel support here as the size and not just the * Note that we use the kernel support here as the size and not just the
...@@ -246,7 +246,7 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx, ...@@ -246,7 +246,7 @@ runner_iact_nonsym_bh_bh_swallow(const float r2, const float *dx,
__attribute__((always_inline)) INLINE static void __attribute__((always_inline)) INLINE static void
runner_iact_nonsym_bh_gas_feedback(const float r2, const float *dx, runner_iact_nonsym_bh_gas_feedback(const float r2, const float *dx,
const float hi, const float hj, const float hi, const float hj,
struct bpart *restrict bi, const struct bpart *restrict bi,
struct part *restrict pj, struct part *restrict pj,
struct xpart *restrict xpj, struct xpart *restrict xpj,
const struct cosmology *cosmo, const struct cosmology *cosmo,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment