Skip to content
Snippets Groups Projects
Commit 1f166e46 authored by Matthieu Schaller's avatar Matthieu Schaller Committed by Matthieu Schaller
Browse files

Corrected typo in 5th order derivative of Chi in the Gadget-2 trunctation formula.

parent c5a703a2
No related branches found
No related tags found
2 merge requests!566Periodic gravity calculation,!565Mesh force task
...@@ -47,6 +47,6 @@ Gravity: ...@@ -47,6 +47,6 @@ Gravity:
mesh_side_length: 16 mesh_side_length: 16
eta: 0.025 eta: 0.025
theta: 0.85 theta: 0.85
r_cut_max: 6. r_cut_max: 5.
comoving_softening: 0.0001 comoving_softening: 0.0001
max_physical_softening: 0.0001 max_physical_softening: 0.0001
...@@ -67,7 +67,7 @@ __attribute__((always_inline)) INLINE static void kernel_long_grav_derivatives( ...@@ -67,7 +67,7 @@ __attribute__((always_inline)) INLINE static void kernel_long_grav_derivatives(
derivs->chi_2 = rs_inv2 * u; derivs->chi_2 = rs_inv2 * u;
derivs->chi_3 = -rs_inv3 * (u2 - 0.5f); derivs->chi_3 = -rs_inv3 * (u2 - 0.5f);
derivs->chi_4 = rs_inv4 * (u3 - 1.5f * u); derivs->chi_4 = rs_inv4 * (u3 - 1.5f * u);
derivs->chi_5 = -rs_inv5 * (u4 - u2 + 0.75f); derivs->chi_5 = -rs_inv5 * (u4 - 3.f * u2 + 0.75f);
const float one_over_sqrt_pi = ((float)(M_2_SQRTPI * 0.5)); const float one_over_sqrt_pi = ((float)(M_2_SQRTPI * 0.5));
const float common_factor = one_over_sqrt_pi * expf(-u2); const float common_factor = one_over_sqrt_pi * expf(-u2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment