From 355f322c00046b263bf9927e8d22e3a45e8c92f0 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Mon, 12 Jun 2017 16:09:36 +0200
Subject: [PATCH] Do not activate sub-cells if the sub-type is not density

---
 src/engine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/engine.c b/src/engine.c
index 3375b8fd0a..6c2a672fd7 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -2547,7 +2547,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
       if (cell_is_active(t->ci, e)) scheduler_activate(s, t);
 
       /* Store current values of dx_max and h_max. */
-      if (t->type == task_type_sub_self) {
+      if (t->type == task_type_sub_self && t->subtype == task_subtype_density) {
         cell_activate_subcell_tasks(t->ci, NULL, s);
       }
     }
-- 
GitLab