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

Separate the time-step information for hydro and gravity tasks into two...

Separate the time-step information for hydro and gravity tasks into two different set of variables for each cell.
parent 5048bd16
...@@ -82,19 +82,19 @@ __attribute__((always_inline)) INLINE static int cell_are_gpart_drifted( ...@@ -82,19 +82,19 @@ __attribute__((always_inline)) INLINE static int cell_are_gpart_drifted(
* @param e The #engine containing information about the current time. * @param e The #engine containing information about the current time.
* @return 1 if the #cell contains at least an active particle, 0 otherwise. * @return 1 if the #cell contains at least an active particle, 0 otherwise.
*/ */
__attribute__((always_inline)) INLINE static int cell_is_active( __attribute__((always_inline)) INLINE static int cell_is_active_hydro(
const struct cell *c, const struct engine *e) { const struct cell *c, const struct engine *e) {
#ifdef SWIFT_DEBUG_CHECKS #ifdef SWIFT_DEBUG_CHECKS
if (c->ti_end_min < e->ti_current) if (c->ti_hydro_end_min < e->ti_current)
error( error(
"cell in an impossible time-zone! c->ti_end_min=%lld (t=%e) and " "cell in an impossible time-zone! c->ti_end_min=%lld (t=%e) and "
"e->ti_current=%lld (t=%e)", "e->ti_current=%lld (t=%e)",
c->ti_end_min, c->ti_end_min * e->timeBase, e->ti_current, c->ti_hydro_end_min, c->ti_hydro_end_min * e->timeBase, e->ti_current,
e->ti_current * e->timeBase); e->ti_current * e->timeBase);
#endif #endif
return (c->ti_end_min == e->ti_current); return (c->ti_hydro_end_min == e->ti_current);
} }
/** /**
...@@ -104,18 +104,61 @@ __attribute__((always_inline)) INLINE static int cell_is_active( ...@@ -104,18 +104,61 @@ __attribute__((always_inline)) INLINE static int cell_is_active(
* @param e The #engine containing information about the current time. * @param e The #engine containing information about the current time.
* @return 1 if all particles in a #cell are active, 0 otherwise. * @return 1 if all particles in a #cell are active, 0 otherwise.
*/ */
__attribute__((always_inline)) INLINE static int cell_is_all_active( __attribute__((always_inline)) INLINE static int cell_is_all_active_hydro(
const struct cell *c, const struct engine *e) { const struct cell *c, const struct engine *e) {
#ifdef SWIFT_DEBUG_CHECKS #ifdef SWIFT_DEBUG_CHECKS
if (c->ti_end_max < e->ti_current) if (c->ti_hydro_end_max < e->ti_current)
error( error(
"cell in an impossible time-zone! c->ti_end_max=%lld " "cell in an impossible time-zone! c->ti_end_max=%lld "
"e->ti_current=%lld", "e->ti_current=%lld",
c->ti_end_max, e->ti_current); c->ti_hydro_end_max, e->ti_current);
#endif #endif
return (c->ti_end_max == e->ti_current); return (c->ti_hydro_end_max == e->ti_current);
}
/**
* @brief Does a cell contain any g-particle finishing their time-step now ?
*
* @param c The #cell.
* @param e The #engine containing information about the current time.
* @return 1 if the #cell contains at least an active particle, 0 otherwise.
*/
__attribute__((always_inline)) INLINE static int cell_is_active_gravity(
const struct cell *c, const struct engine *e) {
#ifdef SWIFT_DEBUG_CHECKS
if (c->ti_gravity_end_min < e->ti_current)
error(
"cell in an impossible time-zone! c->ti_end_min=%lld (t=%e) and "
"e->ti_current=%lld (t=%e)",
c->ti_gravity_end_min, c->ti_gravity_end_min * e->timeBase,
e->ti_current, e->ti_current * e->timeBase);
#endif
return (c->ti_gravity_end_min == e->ti_current);
}
/**
* @brief Are *all* g-particles in a cell finishing their time-step now ?
*
* @param c The #cell.
* @param e The #engine containing information about the current time.
* @return 1 if all particles in a #cell are active, 0 otherwise.
*/
__attribute__((always_inline)) INLINE static int cell_is_all_active_gravity(
const struct cell *c, const struct engine *e) {
#ifdef SWIFT_DEBUG_CHECKS
if (c->ti_gravity_end_max < e->ti_current)
error(
"cell in an impossible time-zone! c->ti_end_max=%lld "
"e->ti_current=%lld",
c->ti_gravity_end_max, e->ti_current);
#endif
return (c->ti_gravity_end_max == e->ti_current);
} }
/** /**
...@@ -215,19 +258,41 @@ __attribute__((always_inline)) INLINE static int spart_is_active( ...@@ -215,19 +258,41 @@ __attribute__((always_inline)) INLINE static int spart_is_active(
* @param e The #engine containing information about the current time. * @param e The #engine containing information about the current time.
* @return 1 if the #cell contains at least an active particle, 0 otherwise. * @return 1 if the #cell contains at least an active particle, 0 otherwise.
*/ */
__attribute__((always_inline)) INLINE static int cell_is_starting( __attribute__((always_inline)) INLINE static int cell_is_starting_hydro(
const struct cell *c, const struct engine *e) { const struct cell *c, const struct engine *e) {
#ifdef SWIFT_DEBUG_CHECKS #ifdef SWIFT_DEBUG_CHECKS
if (c->ti_beg_max > e->ti_current) if (c->ti_hydro_beg_max > e->ti_current)
error( error(
"cell in an impossible time-zone! c->ti_beg_max=%lld (t=%e) and " "cell in an impossible time-zone! c->ti_beg_max=%lld (t=%e) and "
"e->ti_current=%lld (t=%e)", "e->ti_current=%lld (t=%e)",
c->ti_beg_max, c->ti_beg_max * e->timeBase, e->ti_current, c->ti_hydro_beg_max, c->ti_hydro_beg_max * e->timeBase, e->ti_current,
e->ti_current * e->timeBase); e->ti_current * e->timeBase);
#endif #endif
return (c->ti_beg_max == e->ti_current); return (c->ti_hydro_beg_max == e->ti_current);
}
/**
* @brief Does a cell contain any g-particle starting their time-step now ?
*
* @param c The #cell.
* @param e The #engine containing information about the current time.
* @return 1 if the #cell contains at least an active particle, 0 otherwise.
*/
__attribute__((always_inline)) INLINE static int cell_is_starting_gravity(
const struct cell *c, const struct engine *e) {
#ifdef SWIFT_DEBUG_CHECKS
if (c->ti_gravity_beg_max > e->ti_current)
error(
"cell in an impossible time-zone! c->ti_beg_max=%lld (t=%e) and "
"e->ti_current=%lld (t=%e)",
c->ti_gravity_beg_max, c->ti_gravity_beg_max * e->timeBase,
e->ti_current, e->ti_current * e->timeBase);
#endif
return (c->ti_gravity_beg_max == e->ti_current);
} }
/** /**
......
...@@ -173,8 +173,10 @@ int cell_pack(struct cell *restrict c, struct pcell *restrict pc) { ...@@ -173,8 +173,10 @@ int cell_pack(struct cell *restrict c, struct pcell *restrict pc) {
/* Start by packing the data of the current cell. */ /* Start by packing the data of the current cell. */
pc->h_max = c->h_max; pc->h_max = c->h_max;
pc->ti_end_min = c->ti_end_min; pc->ti_hydro_end_min = c->ti_hydro_end_min;
pc->ti_end_max = c->ti_end_max; pc->ti_hydro_end_max = c->ti_hydro_end_max;
pc->ti_gravity_end_min = c->ti_gravity_end_min;
pc->ti_gravity_end_max = c->ti_gravity_end_max;
pc->ti_old_part = c->ti_old_part; pc->ti_old_part = c->ti_old_part;
pc->ti_old_gpart = c->ti_old_gpart; pc->ti_old_gpart = c->ti_old_gpart;
pc->ti_old_multipole = c->ti_old_multipole; pc->ti_old_multipole = c->ti_old_multipole;
...@@ -221,8 +223,10 @@ int cell_unpack(struct pcell *restrict pc, struct cell *restrict c, ...@@ -221,8 +223,10 @@ int cell_unpack(struct pcell *restrict pc, struct cell *restrict c,
/* Unpack the current pcell. */ /* Unpack the current pcell. */
c->h_max = pc->h_max; c->h_max = pc->h_max;
c->ti_end_min = pc->ti_end_min; c->ti_hydro_end_min = pc->ti_hydro_end_min;
c->ti_end_max = pc->ti_end_max; c->ti_hydro_end_max = pc->ti_hydro_end_max;
c->ti_gravity_end_min = pc->ti_gravity_end_min;
c->ti_gravity_end_max = pc->ti_gravity_end_max;
c->ti_old_part = pc->ti_old_part; c->ti_old_part = pc->ti_old_part;
c->ti_old_gpart = pc->ti_old_gpart; c->ti_old_gpart = pc->ti_old_gpart;
c->ti_old_multipole = pc->ti_old_multipole; c->ti_old_multipole = pc->ti_old_multipole;
...@@ -291,7 +295,8 @@ int cell_pack_end_step(struct cell *restrict c, ...@@ -291,7 +295,8 @@ int cell_pack_end_step(struct cell *restrict c,
#ifdef WITH_MPI #ifdef WITH_MPI
/* Pack this cell's data. */ /* Pack this cell's data. */
pcells[0].ti_end_min = c->ti_end_min; pcells[0].ti_hydro_end_min = c->ti_hydro_end_min;
pcells[0].ti_gravity_end_min = c->ti_gravity_end_min;
pcells[0].dx_max_part = c->dx_max_part; pcells[0].dx_max_part = c->dx_max_part;
pcells[0].dx_max_gpart = c->dx_max_gpart; pcells[0].dx_max_gpart = c->dx_max_gpart;
...@@ -325,7 +330,8 @@ int cell_unpack_end_step(struct cell *restrict c, ...@@ -325,7 +330,8 @@ int cell_unpack_end_step(struct cell *restrict c,
#ifdef WITH_MPI #ifdef WITH_MPI
/* Unpack this cell's data. */ /* Unpack this cell's data. */
c->ti_end_min = pcells[0].ti_end_min; c->ti_hydro_end_min = pcells[0].ti_hydro_end_min;
c->ti_gravity_end_min = pcells[0].ti_gravity_end_min;
c->dx_max_part = pcells[0].dx_max_part; c->dx_max_part = pcells[0].dx_max_part;
c->dx_max_gpart = pcells[0].dx_max_gpart; c->dx_max_gpart = pcells[0].dx_max_gpart;
...@@ -1487,8 +1493,8 @@ void cell_activate_sorts(struct cell *c, int sid, struct scheduler *s) { ...@@ -1487,8 +1493,8 @@ void cell_activate_sorts(struct cell *c, int sid, struct scheduler *s) {
* @param cj The second #cell we recurse in. * @param cj The second #cell we recurse in.
* @param s The task #scheduler. * @param s The task #scheduler.
*/ */
void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj, void cell_activate_subcell_hydro_tasks(struct cell *ci, struct cell *cj,
struct scheduler *s) { struct scheduler *s) {
const struct engine *e = s->space->e; const struct engine *e = s->space->e;
/* Store the current dx_max and h_max values. */ /* Store the current dx_max and h_max values. */
...@@ -1502,7 +1508,7 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj, ...@@ -1502,7 +1508,7 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj,
/* Self interaction? */ /* Self interaction? */
if (cj == NULL) { if (cj == NULL) {
/* Do anything? */ /* Do anything? */
if (!cell_is_active(ci, e)) return; if (!cell_is_active_hydro(ci, e)) return;
/* Recurse? */ /* Recurse? */
if (cell_can_recurse_in_self_task(ci)) { if (cell_can_recurse_in_self_task(ci)) {
...@@ -1510,10 +1516,11 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj, ...@@ -1510,10 +1516,11 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj,
/* Loop over all progenies and pairs of progenies */ /* Loop over all progenies and pairs of progenies */
for (int j = 0; j < 8; j++) { for (int j = 0; j < 8; j++) {
if (ci->progeny[j] != NULL) { if (ci->progeny[j] != NULL) {
cell_activate_subcell_tasks(ci->progeny[j], NULL, s); cell_activate_subcell_hydro_tasks(ci->progeny[j], NULL, s);
for (int k = j + 1; k < 8; k++) for (int k = j + 1; k < 8; k++)
if (ci->progeny[k] != NULL) if (ci->progeny[k] != NULL)
cell_activate_subcell_tasks(ci->progeny[j], ci->progeny[k], s); cell_activate_subcell_hydro_tasks(ci->progeny[j], ci->progeny[k],
s);
} }
} }
} else { } else {
...@@ -1537,200 +1544,200 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj, ...@@ -1537,200 +1544,200 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj,
/* Regular sub-cell interactions of a single cell. */ /* Regular sub-cell interactions of a single cell. */
case 0: /* ( 1 , 1 , 1 ) */ case 0: /* ( 1 , 1 , 1 ) */
if (ci->progeny[7] != NULL && cj->progeny[0] != NULL) if (ci->progeny[7] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[0], s);
break; break;
case 1: /* ( 1 , 1 , 0 ) */ case 1: /* ( 1 , 1 , 0 ) */
if (ci->progeny[6] != NULL && cj->progeny[0] != NULL) if (ci->progeny[6] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[0], s);
if (ci->progeny[6] != NULL && cj->progeny[1] != NULL) if (ci->progeny[6] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[1], s);
if (ci->progeny[7] != NULL && cj->progeny[0] != NULL) if (ci->progeny[7] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[0], s);
if (ci->progeny[7] != NULL && cj->progeny[1] != NULL) if (ci->progeny[7] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[1], s);
break; break;
case 2: /* ( 1 , 1 , -1 ) */ case 2: /* ( 1 , 1 , -1 ) */
if (ci->progeny[6] != NULL && cj->progeny[1] != NULL) if (ci->progeny[6] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[1], s);
break; break;
case 3: /* ( 1 , 0 , 1 ) */ case 3: /* ( 1 , 0 , 1 ) */
if (ci->progeny[5] != NULL && cj->progeny[0] != NULL) if (ci->progeny[5] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[5], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[5], cj->progeny[0], s);
if (ci->progeny[5] != NULL && cj->progeny[2] != NULL) if (ci->progeny[5] != NULL && cj->progeny[2] != NULL)
cell_activate_subcell_tasks(ci->progeny[5], cj->progeny[2], s); cell_activate_subcell_hydro_tasks(ci->progeny[5], cj->progeny[2], s);
if (ci->progeny[7] != NULL && cj->progeny[0] != NULL) if (ci->progeny[7] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[0], s);
if (ci->progeny[7] != NULL && cj->progeny[2] != NULL) if (ci->progeny[7] != NULL && cj->progeny[2] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[2], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[2], s);
break; break;
case 4: /* ( 1 , 0 , 0 ) */ case 4: /* ( 1 , 0 , 0 ) */
if (ci->progeny[4] != NULL && cj->progeny[0] != NULL) if (ci->progeny[4] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[4], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[4], cj->progeny[0], s);
if (ci->progeny[4] != NULL && cj->progeny[1] != NULL) if (ci->progeny[4] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[4], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[4], cj->progeny[1], s);
if (ci->progeny[4] != NULL && cj->progeny[2] != NULL) if (ci->progeny[4] != NULL && cj->progeny[2] != NULL)
cell_activate_subcell_tasks(ci->progeny[4], cj->progeny[2], s); cell_activate_subcell_hydro_tasks(ci->progeny[4], cj->progeny[2], s);
if (ci->progeny[4] != NULL && cj->progeny[3] != NULL) if (ci->progeny[4] != NULL && cj->progeny[3] != NULL)
cell_activate_subcell_tasks(ci->progeny[4], cj->progeny[3], s); cell_activate_subcell_hydro_tasks(ci->progeny[4], cj->progeny[3], s);
if (ci->progeny[5] != NULL && cj->progeny[0] != NULL) if (ci->progeny[5] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[5], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[5], cj->progeny[0], s);
if (ci->progeny[5] != NULL && cj->progeny[1] != NULL) if (ci->progeny[5] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[5], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[5], cj->progeny[1], s);
if (ci->progeny[5] != NULL && cj->progeny[2] != NULL) if (ci->progeny[5] != NULL && cj->progeny[2] != NULL)
cell_activate_subcell_tasks(ci->progeny[5], cj->progeny[2], s); cell_activate_subcell_hydro_tasks(ci->progeny[5], cj->progeny[2], s);
if (ci->progeny[5] != NULL && cj->progeny[3] != NULL) if (ci->progeny[5] != NULL && cj->progeny[3] != NULL)
cell_activate_subcell_tasks(ci->progeny[5], cj->progeny[3], s); cell_activate_subcell_hydro_tasks(ci->progeny[5], cj->progeny[3], s);
if (ci->progeny[6] != NULL && cj->progeny[0] != NULL) if (ci->progeny[6] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[0], s);
if (ci->progeny[6] != NULL && cj->progeny[1] != NULL) if (ci->progeny[6] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[1], s);
if (ci->progeny[6] != NULL && cj->progeny[2] != NULL) if (ci->progeny[6] != NULL && cj->progeny[2] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[2], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[2], s);
if (ci->progeny[6] != NULL && cj->progeny[3] != NULL) if (ci->progeny[6] != NULL && cj->progeny[3] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[3], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[3], s);
if (ci->progeny[7] != NULL && cj->progeny[0] != NULL) if (ci->progeny[7] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[0], s);
if (ci->progeny[7] != NULL && cj->progeny[1] != NULL) if (ci->progeny[7] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[1], s);
if (ci->progeny[7] != NULL && cj->progeny[2] != NULL) if (ci->progeny[7] != NULL && cj->progeny[2] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[2], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[2], s);
if (ci->progeny[7] != NULL && cj->progeny[3] != NULL) if (ci->progeny[7] != NULL && cj->progeny[3] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[3], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[3], s);
break; break;
case 5: /* ( 1 , 0 , -1 ) */ case 5: /* ( 1 , 0 , -1 ) */
if (ci->progeny[4] != NULL && cj->progeny[1] != NULL) if (ci->progeny[4] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[4], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[4], cj->progeny[1], s);
if (ci->progeny[4] != NULL && cj->progeny[3] != NULL) if (ci->progeny[4] != NULL && cj->progeny[3] != NULL)
cell_activate_subcell_tasks(ci->progeny[4], cj->progeny[3], s); cell_activate_subcell_hydro_tasks(ci->progeny[4], cj->progeny[3], s);
if (ci->progeny[6] != NULL && cj->progeny[1] != NULL) if (ci->progeny[6] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[1], s);
if (ci->progeny[6] != NULL && cj->progeny[3] != NULL) if (ci->progeny[6] != NULL && cj->progeny[3] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[3], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[3], s);
break; break;
case 6: /* ( 1 , -1 , 1 ) */ case 6: /* ( 1 , -1 , 1 ) */
if (ci->progeny[5] != NULL && cj->progeny[2] != NULL) if (ci->progeny[5] != NULL && cj->progeny[2] != NULL)
cell_activate_subcell_tasks(ci->progeny[5], cj->progeny[2], s); cell_activate_subcell_hydro_tasks(ci->progeny[5], cj->progeny[2], s);
break; break;
case 7: /* ( 1 , -1 , 0 ) */ case 7: /* ( 1 , -1 , 0 ) */
if (ci->progeny[4] != NULL && cj->progeny[2] != NULL) if (ci->progeny[4] != NULL && cj->progeny[2] != NULL)
cell_activate_subcell_tasks(ci->progeny[4], cj->progeny[2], s); cell_activate_subcell_hydro_tasks(ci->progeny[4], cj->progeny[2], s);
if (ci->progeny[4] != NULL && cj->progeny[3] != NULL) if (ci->progeny[4] != NULL && cj->progeny[3] != NULL)
cell_activate_subcell_tasks(ci->progeny[4], cj->progeny[3], s); cell_activate_subcell_hydro_tasks(ci->progeny[4], cj->progeny[3], s);
if (ci->progeny[5] != NULL && cj->progeny[2] != NULL) if (ci->progeny[5] != NULL && cj->progeny[2] != NULL)
cell_activate_subcell_tasks(ci->progeny[5], cj->progeny[2], s); cell_activate_subcell_hydro_tasks(ci->progeny[5], cj->progeny[2], s);
if (ci->progeny[5] != NULL && cj->progeny[3] != NULL) if (ci->progeny[5] != NULL && cj->progeny[3] != NULL)
cell_activate_subcell_tasks(ci->progeny[5], cj->progeny[3], s); cell_activate_subcell_hydro_tasks(ci->progeny[5], cj->progeny[3], s);
break; break;
case 8: /* ( 1 , -1 , -1 ) */ case 8: /* ( 1 , -1 , -1 ) */
if (ci->progeny[4] != NULL && cj->progeny[3] != NULL) if (ci->progeny[4] != NULL && cj->progeny[3] != NULL)
cell_activate_subcell_tasks(ci->progeny[4], cj->progeny[3], s); cell_activate_subcell_hydro_tasks(ci->progeny[4], cj->progeny[3], s);
break; break;
case 9: /* ( 0 , 1 , 1 ) */ case 9: /* ( 0 , 1 , 1 ) */
if (ci->progeny[3] != NULL && cj->progeny[0] != NULL) if (ci->progeny[3] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[3], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[3], cj->progeny[0], s);
if (ci->progeny[3] != NULL && cj->progeny[4] != NULL) if (ci->progeny[3] != NULL && cj->progeny[4] != NULL)
cell_activate_subcell_tasks(ci->progeny[3], cj->progeny[4], s); cell_activate_subcell_hydro_tasks(ci->progeny[3], cj->progeny[4], s);
if (ci->progeny[7] != NULL && cj->progeny[0] != NULL) if (ci->progeny[7] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[0], s);
if (ci->progeny[7] != NULL && cj->progeny[4] != NULL) if (ci->progeny[7] != NULL && cj->progeny[4] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[4], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[4], s);
break; break;
case 10: /* ( 0 , 1 , 0 ) */ case 10: /* ( 0 , 1 , 0 ) */
if (ci->progeny[2] != NULL && cj->progeny[0] != NULL) if (ci->progeny[2] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[2], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[2], cj->progeny[0], s);
if (ci->progeny[2] != NULL && cj->progeny[1] != NULL) if (ci->progeny[2] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[2], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[2], cj->progeny[1], s);
if (ci->progeny[2] != NULL && cj->progeny[4] != NULL) if (ci->progeny[2] != NULL && cj->progeny[4] != NULL)
cell_activate_subcell_tasks(ci->progeny[2], cj->progeny[4], s); cell_activate_subcell_hydro_tasks(ci->progeny[2], cj->progeny[4], s);
if (ci->progeny[2] != NULL && cj->progeny[5] != NULL) if (ci->progeny[2] != NULL && cj->progeny[5] != NULL)
cell_activate_subcell_tasks(ci->progeny[2], cj->progeny[5], s); cell_activate_subcell_hydro_tasks(ci->progeny[2], cj->progeny[5], s);
if (ci->progeny[3] != NULL && cj->progeny[0] != NULL) if (ci->progeny[3] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[3], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[3], cj->progeny[0], s);
if (ci->progeny[3] != NULL && cj->progeny[1] != NULL) if (ci->progeny[3] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[3], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[3], cj->progeny[1], s);
if (ci->progeny[3] != NULL && cj->progeny[4] != NULL) if (ci->progeny[3] != NULL && cj->progeny[4] != NULL)
cell_activate_subcell_tasks(ci->progeny[3], cj->progeny[4], s); cell_activate_subcell_hydro_tasks(ci->progeny[3], cj->progeny[4], s);
if (ci->progeny[3] != NULL && cj->progeny[5] != NULL) if (ci->progeny[3] != NULL && cj->progeny[5] != NULL)
cell_activate_subcell_tasks(ci->progeny[3], cj->progeny[5], s); cell_activate_subcell_hydro_tasks(ci->progeny[3], cj->progeny[5], s);
if (ci->progeny[6] != NULL && cj->progeny[0] != NULL) if (ci->progeny[6] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[0], s);
if (ci->progeny[6] != NULL && cj->progeny[1] != NULL) if (ci->progeny[6] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[1], s);
if (ci->progeny[6] != NULL && cj->progeny[4] != NULL) if (ci->progeny[6] != NULL && cj->progeny[4] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[4], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[4], s);
if (ci->progeny[6] != NULL && cj->progeny[5] != NULL) if (ci->progeny[6] != NULL && cj->progeny[5] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[5], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[5], s);
if (ci->progeny[7] != NULL && cj->progeny[0] != NULL) if (ci->progeny[7] != NULL && cj->progeny[0] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[0], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[0], s);
if (ci->progeny[7] != NULL && cj->progeny[1] != NULL) if (ci->progeny[7] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[1], s);
if (ci->progeny[7] != NULL && cj->progeny[4] != NULL) if (ci->progeny[7] != NULL && cj->progeny[4] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[4], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[4], s);
if (ci->progeny[7] != NULL && cj->progeny[5] != NULL) if (ci->progeny[7] != NULL && cj->progeny[5] != NULL)
cell_activate_subcell_tasks(ci->progeny[7], cj->progeny[5], s); cell_activate_subcell_hydro_tasks(ci->progeny[7], cj->progeny[5], s);
break; break;
case 11: /* ( 0 , 1 , -1 ) */ case 11: /* ( 0 , 1 , -1 ) */
if (ci->progeny[2] != NULL && cj->progeny[1] != NULL) if (ci->progeny[2] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[2], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[2], cj->progeny[1], s);
if (ci->progeny[2] != NULL && cj->progeny[5] != NULL) if (ci->progeny[2] != NULL && cj->progeny[5] != NULL)
cell_activate_subcell_tasks(ci->progeny[2], cj->progeny[5], s); cell_activate_subcell_hydro_tasks(ci->progeny[2], cj->progeny[5], s);
if (ci->progeny[6] != NULL && cj->progeny[1] != NULL) if (ci->progeny[6] != NULL && cj->progeny[1] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[1], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[1], s);
if (ci->progeny[6] != NULL && cj->progeny[5] != NULL) if (ci->progeny[6] != NULL && cj->progeny[5] != NULL)
cell_activate_subcell_tasks(ci->progeny[6], cj->progeny[5], s); cell_activate_subcell_hydro_tasks(ci->progeny[6], cj->progeny[5], s);
break; break;
case 12: /* ( 0 , 0 , 1 ) */ case 12: /* ( 0 , 0 , 1 ) */
if (ci->progeny[1] != NULL && cj->progeny[0] != NULL) if (ci->progeny[1] != NULL && cj->