From 4f93e8c885a0c1fee733e52ae9bf01be35c29e0a Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Wed, 10 May 2017 23:03:25 +0200
Subject: [PATCH] Reset the particles  for every run in test125.

---
 tests/test125cells.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/tests/test125cells.c b/tests/test125cells.c
index 7611202901..7ad407b5a9 100644
--- a/tests/test125cells.c
+++ b/tests/test125cells.c
@@ -1,3 +1,4 @@
+
 /*******************************************************************************
  * This file is part of SWIFT.
  * Copyright (C) 2016 Matthieu Schaller (matthieu.schaller@durham.ac.uk).
@@ -543,9 +544,9 @@ int main(int argc, char *argv[]) {
   /* Build the infrastructure */
   struct space space;
   space.periodic = 1;
-  space.dim[0] = 3.;
-  space.dim[1] = 3.;
-  space.dim[2] = 3.;
+  space.dim[0] = 5.;
+  space.dim[1] = 5.;
+  space.dim[2] = 5.;
   hydro_space_init(&space.hs, &space);
 
   struct phys_const prog_const;
@@ -699,6 +700,12 @@ int main(int argc, char *argv[]) {
               outputFileNameExtension);
       dump_particle_fields(outputFileName, main_cell, solution, 0);
     }
+
+    /* Reset stuff */
+    for (int i = 0; i < 125; ++i) {
+      for (int n = 0; n < cells[i]->count; ++n)
+        hydro_init_part(&cells[i]->parts[n], &space.hs);
+    }
   }
 
   /* Output timing */
-- 
GitLab