diff --git a/src/cell.c b/src/cell.c index 97ad8e051f0d484c5fc9d12de02898ac0c0cfe2f..7a0d481f00065fd0473ca52ac921e60ff6953e3a 100644 --- a/src/cell.c +++ b/src/cell.c @@ -1102,36 +1102,6 @@ void cell_reset_task_counters(struct cell *c) { #endif } -/** - * @brief Checks whether the cells are direct neighbours ot not. Both cells have - * to be of the same size - * - * @param ci First #cell. - * @param cj Second #cell. - * - * @todo Deal with periodicity. - */ -int cell_are_neighbours(const struct cell *restrict ci, - const struct cell *restrict cj) { - -#ifdef SWIFT_DEBUG_CHECKS - if (ci->width[0] != cj->width[0]) error("Cells of different size !"); -#endif - - /* Maximum allowed distance */ - const double min_dist = - 1.2 * ci->width[0]; /* 1.2 accounts for rounding errors */ - - /* (Manhattan) Distance between the cells */ - for (int k = 0; k < 3; k++) { - const double center_i = ci->loc[k]; - const double center_j = cj->loc[k]; - if (fabs(center_i - center_j) > min_dist) return 0; - } - - return 1; -} - /** * @brief Computes the multi-pole brutally and compare to the * recursively computed one. @@ -1145,6 +1115,8 @@ void cell_check_multipole(struct cell *c, void *data) { struct gravity_tensors ma; const double tolerance = 1e-3; /* Relative */ + return; + /* First recurse */ if (c->split) for (int k = 0; k < 8; k++) diff --git a/src/cell.h b/src/cell.h index b3bc7363f59ba6f9b117bfa690088ab9de40a28e..ef5862219fadd71bf712db49d514f9d7543343d1 100644 --- a/src/cell.h +++ b/src/cell.h @@ -351,8 +351,6 @@ int cell_link_gparts(struct cell *c, struct gpart *gparts); int cell_link_sparts(struct cell *c, struct spart *sparts); void cell_convert_hydro(struct cell *c, void *data); void cell_clean_links(struct cell *c, void *data); -int cell_are_neighbours(const struct cell *restrict ci, - const struct cell *restrict cj); void cell_check_multipole(struct cell *c, void *data); void cell_clean(struct cell *c); void cell_check_particle_drift_point(struct cell *c, void *data); diff --git a/src/gravity_properties.c b/src/gravity_properties.c index f52029fa1543ad1f8d0121c8c4e6d362227f4c53..626651a0426956d27182258e12ad59d24b8901f4 100644 --- a/src/gravity_properties.c +++ b/src/gravity_properties.c @@ -59,7 +59,8 @@ void gravity_props_init(struct gravity_props *p, void gravity_props_print(const struct gravity_props *p) { - message("Self-gravity scheme: FMM-MM"); + message("Self-gravity scheme: FMM-MM with m-poles of order %d", + SELF_GRAVITY_MULTIPOLE_ORDER); message("Self-gravity time integration: eta=%.4f", p->eta); @@ -68,7 +69,7 @@ void gravity_props_print(const struct gravity_props *p) { message("Self-gravity softening: epsilon=%.4f", p->epsilon); if (p->a_smooth != gravity_props_default_a_smooth) - message("Self-gravity smoothing-scale: a_smooth=%f", p->a_smooth); + message("Self-gravity MM smoothing-scale: a_smooth=%f", p->a_smooth); if (p->r_cut != gravity_props_default_r_cut) message("Self-gravity MM cut-off: r_cut=%f", p->r_cut); @@ -81,6 +82,7 @@ void gravity_props_print_snapshot(hid_t h_grpgrav, io_write_attribute_f(h_grpgrav, "Time integration eta", p->eta); io_write_attribute_f(h_grpgrav, "Softening length", p->epsilon); io_write_attribute_f(h_grpgrav, "Opening angle", p->theta_crit); + io_write_attribute_d(h_grpgrav, "MM order", SELF_GRAVITY_MULTIPOLE_ORDER); io_write_attribute_f(h_grpgrav, "MM a_smooth", p->a_smooth); io_write_attribute_f(h_grpgrav, "MM r_cut", p->r_cut); }