Commit a26e112a authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

More consistent naming of the multipole acceptance function.

parent a341d47d
...@@ -1733,8 +1733,7 @@ void cell_activate_subcell_grav_tasks(struct cell *ci, struct cell *cj, ...@@ -1733,8 +1733,7 @@ void cell_activate_subcell_grav_tasks(struct cell *ci, struct cell *cj,
const double r2 = dx * dx + dy * dy + dz * dz; const double r2 = dx * dx + dy * dy + dz * dz;
/* Can we use multipoles ? */ /* Can we use multipoles ? */
if (gravity_multipole_accept(multi_i->r_max, multi_j->r_max, theta_crit2, if (gravity_M2L_accept(multi_i->r_max, multi_j->r_max, theta_crit2, r2)) {
r2)) {
/* Ok, no need to drift anything */ /* Ok, no need to drift anything */
return; return;
......
...@@ -1798,9 +1798,8 @@ void engine_make_self_gravity_tasks_mapper(void *map_data, int num_elements, ...@@ -1798,9 +1798,8 @@ void engine_make_self_gravity_tasks_mapper(void *map_data, int num_elements,
const double r2 = dx * dx + dy * dy + dz * dz; const double r2 = dx * dx + dy * dy + dz * dz;
/* Are the cells too close for a MM interaction ? */ /* Are the cells too close for a MM interaction ? */
if (!gravity_multipole_accept(multi_i->r_max_rebuild, if (!gravity_M2L_accept(multi_i->r_max_rebuild,
multi_j->r_max_rebuild, theta_crit2, multi_j->r_max_rebuild, theta_crit2, r2)) {
r2)) {
/* Ok, we need to add a direct pair calculation */ /* Ok, we need to add a direct pair calculation */
scheduler_addtask(sched, task_type_pair, task_subtype_grav, 0, 0, scheduler_addtask(sched, task_type_pair, task_subtype_grav, 0, 0,
......
...@@ -2399,7 +2399,7 @@ INLINE static void gravity_M2P(const struct multipole *ma, ...@@ -2399,7 +2399,7 @@ INLINE static void gravity_M2P(const struct multipole *ma,
* @param r2 Square of the distance (periodically wrapped) between the * @param r2 Square of the distance (periodically wrapped) between the
* multipoles. * multipoles.
*/ */
__attribute__((always_inline)) INLINE static int gravity_multipole_accept( __attribute__((always_inline)) INLINE static int gravity_M2L_accept(
double r_crit_a, double r_crit_b, double theta_crit2, double r2) { double r_crit_a, double r_crit_b, double theta_crit2, double r2) {
const double size = r_crit_a + r_crit_b; const double size = r_crit_a + r_crit_b;
......
...@@ -946,8 +946,7 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj, ...@@ -946,8 +946,7 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
* option... */ * option... */
/* Can we use M-M interactions ? */ /* Can we use M-M interactions ? */
if (gravity_multipole_accept(multi_i->r_max, multi_j->r_max, theta_crit2, if (gravity_M2L_accept(multi_i->r_max, multi_j->r_max, theta_crit2, r2)) {
r2)) {
/* MATTHIEU: make a symmetric M-M interaction function ! */ /* MATTHIEU: make a symmetric M-M interaction function ! */
runner_dopair_grav_mm(r, ci, cj); runner_dopair_grav_mm(r, ci, cj);
...@@ -1171,8 +1170,7 @@ void runner_do_grav_long_range(struct runner *r, struct cell *ci, int timer) { ...@@ -1171,8 +1170,7 @@ void runner_do_grav_long_range(struct runner *r, struct cell *ci, int timer) {
} }
/* Check the multipole acceptance criterion */ /* Check the multipole acceptance criterion */
if (gravity_multipole_accept(multi_i->r_max, multi_j->r_max, theta_crit2, if (gravity_M2L_accept(multi_i->r_max, multi_j->r_max, theta_crit2, r2)) {
r2)) {
/* Go for a (non-symmetric) M-M calculation */ /* Go for a (non-symmetric) M-M calculation */
runner_dopair_grav_mm(r, ci, cj); runner_dopair_grav_mm(r, ci, cj);
...@@ -1195,9 +1193,8 @@ void runner_do_grav_long_range(struct runner *r, struct cell *ci, int timer) { ...@@ -1195,9 +1193,8 @@ void runner_do_grav_long_range(struct runner *r, struct cell *ci, int timer) {
const double r2_rebuild = dx * dx + dy * dy + dz * dz; const double r2_rebuild = dx * dx + dy * dy + dz * dz;
/* Is the criterion violated now but was OK at the last rebuild ? */ /* Is the criterion violated now but was OK at the last rebuild ? */
if (gravity_multipole_accept(multi_i->r_max_rebuild, if (gravity_M2L_accept(multi_i->r_max_rebuild, multi_j->r_max_rebuild,
multi_j->r_max_rebuild, theta_crit2, theta_crit2, r2_rebuild)) {
r2_rebuild)) {
/* Alright, we have to take charge of that pair in a different way. */ /* Alright, we have to take charge of that pair in a different way. */
// MATTHIEU: We should actually open the tree-node here and recurse. // MATTHIEU: We should actually open the tree-node here and recurse.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment