From 9bfafd388301dc9dcee8bcc99fb4c976850853a7 Mon Sep 17 00:00:00 2001
From: Pedro Gonnet <pedro.gonnet@durham.ac.uk>
Date: Mon, 8 Apr 2013 21:46:44 +0000
Subject: [PATCH] better handling of rebuilds in multiple time steps.

Former-commit-id: 45d1d47b639e422f0b759134d9c6792e9b291d7b
---
 src/space.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/space.c b/src/space.c
index 7baf649922..117c4b2469 100644
--- a/src/space.c
+++ b/src/space.c
@@ -125,7 +125,7 @@ int space_marktasks ( struct space *s ) {
             t->skip = ( t->ci->dt_min > dt_step && t->cj->dt_min > dt_step );
             
             /* Too much particle movement? */
-            if ( !t->skip && t->tight &&
+            if ( t->tight &&
                  ( t->ci->h2dx_max > t->ci->dmin || t->cj->h2dx_max > t->cj->dmin ) )
                 return 1;
                 
@@ -1040,7 +1040,7 @@ void space_splittasks ( struct space *s ) {
                 
             /* Should this task be split-up? */
             if ( ci->split && cj->split &&
-                 ci->h_max < hi/2 && cj->h_max < hj/2 ) {
+                 ci->h_max*space_stretch < hi/2 && cj->h_max*space_stretch < hj/2 ) {
                  
                 /* Replace by a single sub-task? */
                 if ( space_dosub &&
-- 
GitLab