Skip to content
Snippets Groups Projects
Commit d16f58cb authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Correct the condition to escape the creation of hydro tasks in the absence of...

Correct the condition to escape the creation of hydro tasks in the absence of feedabck in the make_hydroloop() function.
parent 0e1a000f
Branches
Tags
1 merge request!752No tasks for empty cells
...@@ -2066,7 +2066,7 @@ void engine_make_hydroloop_tasks_mapper(void *map_data, int num_elements, ...@@ -2066,7 +2066,7 @@ void engine_make_hydroloop_tasks_mapper(void *map_data, int num_elements,
struct cell *ci = &cells[cid]; struct cell *ci = &cells[cid];
/* Skip cells without hydro or star particles */ /* Skip cells without hydro or star particles */
if ((ci->hydro.count == 0) && (with_feedback && ci->stars.count == 0)) if ((ci->hydro.count == 0) && (!with_feedback || ci->stars.count == 0))
continue; continue;
/* If the cell is local build a self-interaction */ /* If the cell is local build a self-interaction */
...@@ -2096,7 +2096,7 @@ void engine_make_hydroloop_tasks_mapper(void *map_data, int num_elements, ...@@ -2096,7 +2096,7 @@ void engine_make_hydroloop_tasks_mapper(void *map_data, int num_elements,
/* Is that neighbour local and does it have gas or star particles ? */ /* Is that neighbour local and does it have gas or star particles ? */
if ((cid >= cjd) || if ((cid >= cjd) ||
((cj->hydro.count == 0) && ((cj->hydro.count == 0) &&
(with_feedback && cj->stars.count == 0)) || (!with_feedback || cj->stars.count == 0)) ||
(ci->nodeID != nodeID && cj->nodeID != nodeID)) (ci->nodeID != nodeID && cj->nodeID != nodeID))
continue; continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment