Commit 456d9fad authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Activate drift

parent a6aaf48c
...@@ -880,10 +880,14 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) { ...@@ -880,10 +880,14 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
/* Activate the drift on both sides */ /* Activate the drift on both sides */
if (t->type == task_type_pair || t->type == task_type_sub_pair) { if (t->type == task_type_pair || t->type == task_type_sub_pair) {
scheduler_activate(s, ci->drift); if (ci->drift != NULL) scheduler_activate(s, ci->drift);
scheduler_activate(s, cj->drift); if (cj->drift != NULL) scheduler_activate(s, cj->drift);
} }
if (t->type == task_type_self || t->type == task_type_sub_self) {
if (ci->drift != NULL) scheduler_activate(s, ci->drift);
}
/* Check whether there was too much particle motion */ /* Check whether there was too much particle motion */
if (t->type == task_type_pair || t->type == task_type_sub_pair) { if (t->type == task_type_pair || t->type == task_type_sub_pair) {
if (t->tight && if (t->tight &&
...@@ -962,7 +966,6 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) { ...@@ -962,7 +966,6 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
if (c->ghost != NULL) scheduler_activate(s, c->ghost); if (c->ghost != NULL) scheduler_activate(s, c->ghost);
if (c->init != NULL) scheduler_activate(s, c->init); if (c->init != NULL) scheduler_activate(s, c->init);
if (c->kick != NULL) scheduler_activate(s, c->kick); if (c->kick != NULL) scheduler_activate(s, c->kick);
if (c->drift != NULL) scheduler_activate(s, c->drift);
if (c->cooling != NULL) scheduler_activate(s, c->cooling); if (c->cooling != NULL) scheduler_activate(s, c->cooling);
if (c->sourceterms != NULL) scheduler_activate(s, c->sourceterms); if (c->sourceterms != NULL) scheduler_activate(s, c->sourceterms);
......
...@@ -1986,6 +1986,16 @@ void engine_marktasks_mapper(void *map_data, int num_elements, ...@@ -1986,6 +1986,16 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
if (t->ci->ti_end_min <= ti_end) scheduler_activate(s, t); if (t->ci->ti_end_min <= ti_end) scheduler_activate(s, t);
} }
/* Self? */
else if (t->type == task_type_self || t->type == task_type_sub_self) {
/* Local pointers. */
const struct cell *ci = t->ci;
/* Activate the drift */
if(ci->drift) scheduler_activate(s, ci->drift);
}
/* Pair? */ /* Pair? */
else if (t->type == task_type_pair || t->type == task_type_sub_pair) { else if (t->type == task_type_pair || t->type == task_type_sub_pair) {
...@@ -1995,7 +2005,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements, ...@@ -1995,7 +2005,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* Activate the drift on both sides */ /* Activate the drift on both sides */
if(ci->drift) scheduler_activate(s, ci->drift); if(ci->drift) scheduler_activate(s, ci->drift);
if(ci->drift) scheduler_activate(s, cj->drift); if(cj->drift) scheduler_activate(s, cj->drift);
/* Too much particle movement? */ /* Too much particle movement? */
if (t->tight && if (t->tight &&
......
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