From c0c396972d0ce29e35a1c2c327fa6b7208cc9be7 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Sun, 3 Jun 2018 15:13:32 +0200 Subject: [PATCH] Correct definition of a_smooth for the mesh forces. --- src/mesh_gravity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh_gravity.c b/src/mesh_gravity.c index bdc7ba941e..cfeec68c76 100644 --- a/src/mesh_gravity.c +++ b/src/mesh_gravity.c @@ -388,7 +388,7 @@ void pm_mesh_compute_potential(struct pm_mesh* mesh, const struct engine* e) { /* Some common factors */ const double green_fac = -1. / (M_PI * box_size); const double a_smooth2 = - 4. * M_PI * M_PI * a_smooth * a_smooth / ((double)(N * N)); + 4. * M_PI * M_PI * a_smooth * a_smooth / (box_size * box_size); const double k_fac = M_PI / (double)N; /* Now de-convolve the CIC kernel and apply the Green function */ -- GitLab