Commit d6e3942d authored by Loic Hausammann's avatar Loic Hausammann
Browse files

Add MPI comm for stars.ti_end_min

parent aa9e87fd
......@@ -184,6 +184,7 @@ int cell_pack(struct cell *restrict c, struct pcell *restrict pc,
pc->hydro.ti_end_max = c->hydro.ti_end_max;
pc->grav.ti_end_min = c->grav.ti_end_min;
pc->grav.ti_end_max = c->grav.ti_end_max;
pc->stars.ti_end_min = c->stars.ti_end_min;
pc->hydro.ti_old_part = c->hydro.ti_old_part;
pc->grav.ti_old_part = c->grav.ti_old_part;
pc->grav.ti_old_multipole = c->grav.ti_old_multipole;
......@@ -287,6 +288,7 @@ int cell_unpack(struct pcell *restrict pc, struct cell *restrict c,
c->hydro.ti_end_max = pc->hydro.ti_end_max;
c->grav.ti_end_min = pc->grav.ti_end_min;
c->grav.ti_end_max = pc->grav.ti_end_max;
c->stars.ti_end_min = pc->stars.ti_end_min;
c->hydro.ti_old_part = pc->hydro.ti_old_part;
c->grav.ti_old_part = pc->grav.ti_old_part;
c->grav.ti_old_multipole = pc->grav.ti_old_multipole;
......@@ -415,6 +417,7 @@ int cell_pack_end_step(struct cell *restrict c,
pcells[0].hydro.ti_end_max = c->hydro.ti_end_max;
pcells[0].grav.ti_end_min = c->grav.ti_end_min;
pcells[0].grav.ti_end_max = c->grav.ti_end_max;
pcells[0].stars.ti_end_min = c->stars.ti_end_min;
pcells[0].hydro.dx_max_part = c->hydro.dx_max_part;
pcells[0].stars.dx_max_part = c->stars.dx_max_part;
......@@ -452,6 +455,7 @@ int cell_unpack_end_step(struct cell *restrict c,
c->hydro.ti_end_max = pcells[0].hydro.ti_end_max;
c->grav.ti_end_min = pcells[0].grav.ti_end_min;
c->grav.ti_end_max = pcells[0].grav.ti_end_max;
c->stars.ti_end_min = pcells[0].stars.ti_end_min;
c->hydro.dx_max_part = pcells[0].hydro.dx_max_part;
c->stars.dx_max_part = pcells[0].stars.dx_max_part;
......
......@@ -147,6 +147,9 @@ struct pcell {
/*! Maximal smoothing length. */
double h_max;
/*! Minimal integer end-of-timestep in this cell for stars tasks */
integertime_t ti_end_min;
} stars;
/*! Maximal depth in that part of the tree */
......@@ -198,6 +201,9 @@ struct pcell_step {
/*! Maximal distance any #part has travelled since last rebuild */
float dx_max_part;
/*! Minimal integer end-of-timestep in this cell (stars) */
integertime_t ti_end_min;
} stars;
};
......
......@@ -180,13 +180,12 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
#endif
const int ci_active_hydro = cell_is_active_hydro(ci, e);
const int cj_active_hydro = cell_is_active_hydro(cj, e);
const int ci_active_gravity = cell_is_active_gravity(ci, e);
const int cj_active_gravity = cell_is_active_gravity(cj, e);
// MATTHIEU: This is broken here. In cases with ext-potential this
// crashes.
const int ci_active_stars = 0; // cell_is_active_stars(ci, e);
const int cj_active_stars = 0; // cell_is_active_stars(cj, e);
const int ci_active_stars = cell_is_active_stars(ci, e);
const int cj_active_stars = cell_is_active_stars(cj, e);
/* Only activate tasks that involve a local active cell. */
if ((t_subtype == task_subtype_density ||
......
Supports Markdown
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