From c40c0b5a43eb4591d0bff835d03ebe8a5075beae Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Thu, 22 Jan 2015 20:06:58 +0000 Subject: [PATCH] Corrected a bug in iact_self_direct() that erased all previously computed accelerations. --- examples/test_bh_sorted.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/test_bh_sorted.c b/examples/test_bh_sorted.c index 8ec54aa..4b4c4ed 100644 --- a/examples/test_bh_sorted.c +++ b/examples/test_bh_sorted.c @@ -1491,7 +1491,7 @@ void iact_self_direct(struct cell *c) { /* Copy the local particle data back. */ for (k = 0; k < count; k++) { - for (j = 0; j < 3; j++) c->parts[k].a[j] = parts[k].a[j]; + for (j = 0; j < 3; j++) c->parts[k].a[j] += parts[k].a[j]; } } /* otherwise, compute interactions directly. */ } -- GitLab