From 64fc8b32be8d781370d7466c8a8cfd3cbd18e86b Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Fri, 21 Apr 2017 23:40:59 +0100 Subject: [PATCH] Misplaced brackets. --- src/cell.c | 1 + src/multipole.h | 6 ++++-- src/runner_doiact_grav.h | 1 + src/space.c | 8 ++++---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/cell.c b/src/cell.c index 2885e29fe5..2e9c760b50 100644 --- a/src/cell.c +++ b/src/cell.c @@ -1106,6 +1106,7 @@ void cell_reset_task_counters(struct cell *c) { * @brief Recursively construct all the multipoles in a cell hierarchy. * * @param c The #cell. + * @param ti_current The current integer time. */ void cell_make_multipoles(struct cell *c, integertime_t ti_current) { diff --git a/src/multipole.h b/src/multipole.h index a934e66d45..24a526f575 100644 --- a/src/multipole.h +++ b/src/multipole.h @@ -2525,8 +2525,8 @@ INLINE static void gravity_L2P(const struct grav_tensor *lb, * @param ma The #multipole of the first #cell. * @param mb The #multipole of the second #cell. * @param theta_crit_inv The inverse of the critical opening angle. - * @param Are we using the current value of CoM or the ones from the last - * rebuild ? + * @param rebuild Are we using the current value of CoM or the ones from + * the last rebuild ? */ __attribute__((always_inline)) INLINE static int gravity_multipole_accept( const struct gravity_tensors *ma, const struct gravity_tensors *mb, @@ -2546,6 +2546,8 @@ __attribute__((always_inline)) INLINE static int gravity_multipole_accept( const double r2 = dx * dx + dy * dy + dz * dz; + // MATTHIEU: Make this mass-dependent ? + /* Multipole acceptance criterion (Dehnen 2002, eq.10) */ return (r2 > (r_crit_a + r_crit_b) * (r_crit_a + r_crit_b)); } diff --git a/src/runner_doiact_grav.h b/src/runner_doiact_grav.h index aeece8a32f..13a55344d7 100644 --- a/src/runner_doiact_grav.h +++ b/src/runner_doiact_grav.h @@ -650,6 +650,7 @@ void runner_do_grav_long_range(struct runner *r, struct cell *ci, int timer) { theta_crit_inv, 1)) { /* Alright, we have to take charge of that pair in a different way. */ + // MATTHIEU: We should actually open the tree-node here and recurse. runner_dopair_grav_mm(r, ci, cj); } } diff --git a/src/space.c b/src/space.c index 8e5c6ba15a..5a28984a21 100644 --- a/src/space.c +++ b/src/space.c @@ -2197,11 +2197,11 @@ void space_split_recursive(struct space *s, struct cell *c, c->multipole->CoM[2] = c->loc[2] + c->width[2] / 2.; c->multipole->r_max = 0.; } + c->multipole->r_max_rebuild = c->multipole->r_max; + c->multipole->CoM_rebuild[0] = c->multipole->CoM[0]; + c->multipole->CoM_rebuild[1] = c->multipole->CoM[1]; + c->multipole->CoM_rebuild[2] = c->multipole->CoM[2]; } - c->multipole->r_max_rebuild = c->multipole->r_max; - c->multipole->CoM_rebuild[0] = c->multipole->CoM[0]; - c->multipole->CoM_rebuild[1] = c->multipole->CoM[1]; - c->multipole->CoM_rebuild[2] = c->multipole->CoM[2]; } /* Set the values for this cell. */ -- GitLab