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

Also change the vectorized pairs and the partition code.

parent 3cf0ba63
......@@ -4362,15 +4362,15 @@ void engine_step(struct engine *e) {
space_print_cells(e->s);
/* Register the time-step information */
if(e->step == 3) {
for(int i = 0; i< e->s->nr_cells; ++i)
if(&e->s->cells_top[i] - e->s->cells_top == 12) {
message("Found cell!");
address_hydro = &e->s->cells_top[i].ti_hydro_end_min;
address_gravity = &e->s->cells_top[i].ti_gravity_end_min;
message("address: %p time_end=%lld", address_hydro,
e->s->cells_top[i].ti_hydro_end_min);
if (e->step == 3) {
for (int i = 0; i < e->s->nr_cells; ++i)
if (&e->s->cells_top[i] - e->s->cells_top == 12) {
message("Found cell!");
address_hydro = &e->s->cells_top[i].ti_hydro_end_min;
address_gravity = &e->s->cells_top[i].ti_gravity_end_min;
message("address: %p time_end=%lld", address_hydro,
e->s->cells_top[i].ti_hydro_end_min);
}
}
......
......@@ -645,8 +645,8 @@ static void repart_edge_metis(int partweights, int bothweights, int timebins,
* we cut for that. Note that weight is added to the local and
* remote cells, as we want to keep both away from any cuts, this
* can overflow int, so take care. */
int dti = num_time_bins - get_time_bin(ci->ti_end_min);
int dtj = num_time_bins - get_time_bin(cj->ti_end_min);
int dti = num_time_bins - get_time_bin(ci->ti_hydro_end_min);
int dtj = num_time_bins - get_time_bin(cj->ti_hydro_end_min);
double dt = (double)(1 << dti) + (double)(1 << dtj);
weights_e[ik] += dt;
weights_e[jk] += dt;
......
......@@ -1645,8 +1645,8 @@ void runner_do_recv_part(struct runner *r, struct cell *c, int clear_sorts,
#endif
/* ... and store. */
//c->ti_hydro_end_min = ti_hydro_end_min;
//c->ti_hydro_end_max = ti_hydro_end_max;
// c->ti_hydro_end_min = ti_hydro_end_min;
// c->ti_hydro_end_max = ti_hydro_end_max;
c->ti_old_part = ti_current;
c->h_max = h_max;
......@@ -1725,8 +1725,8 @@ void runner_do_recv_gpart(struct runner *r, struct cell *c, int timer) {
#endif
/* ... and store. */
//c->ti_gravity_end_min = ti_gravity_end_min;
//c->ti_gravity_end_max = ti_gravity_end_max;
// c->ti_gravity_end_min = ti_gravity_end_min;
// c->ti_gravity_end_max = ti_gravity_end_max;
c->ti_old_gpart = ti_current;
if (timer) TIMER_TOC(timer_dorecv_gpart);
......
......@@ -539,7 +539,7 @@ __attribute__((always_inline)) INLINE void runner_doself1_density_vec(
TIMER_TIC;
/* Anything to do here? */
if (!cell_is_active(c, e)) return;
if (!cell_is_active_hydro(c, e)) return;
if (!cell_are_part_drifted(c, e)) error("Interacting undrifted cell.");
......@@ -960,7 +960,7 @@ __attribute__((always_inline)) INLINE void runner_doself2_force_vec(
TIMER_TIC;
if (!cell_is_active(c, e)) return;
if (!cell_is_active_hydro(c, e)) return;
if (!cell_are_part_drifted(c, e)) error("Interacting undrifted cell.");
......@@ -1158,8 +1158,8 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
const double di_max = sort_i[count_i - 1].d - rshift;
const double dj_min = sort_j[0].d;
const float dx_max = (ci->dx_max_sort + cj->dx_max_sort);
const int active_ci = cell_is_active(ci, e);
const int active_cj = cell_is_active(cj, e);
const int active_ci = cell_is_active_hydro(ci, e);
const int active_cj = cell_is_active_hydro(cj, e);
#ifdef SWIFT_DEBUG_CHECKS
/* Check that particles have been drifted to the current time */
......@@ -1510,8 +1510,8 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
const double di_max = sort_i[count_i - 1].d - rshift;
const double dj_min = sort_j[0].d;
const float dx_max = (ci->dx_max_sort + cj->dx_max_sort);
const int active_ci = cell_is_active(ci, e);
const int active_cj = cell_is_active(cj, e);
const int active_ci = cell_is_active_hydro(ci, e);
const int active_cj = cell_is_active_hydro(cj, e);
#ifdef SWIFT_DEBUG_CHECKS
/* Check that particles have been drifted to the current time */
......
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