Skip to content
Snippets Groups Projects
Commit 5ab8ca9a authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Corrected bug in Gadget-2 calculation of div_v

parent a28fec06
No related branches found
No related tags found
2 merge requests!136Master,!134Updated vectorisation tests
......@@ -93,8 +93,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_density(
dv[2] = pi->v[2] - pj->v[2];
const float dvdr = dv[0] * dx[0] + dv[1] * dx[1] + dv[2] * dx[2];
pi->div_v += faci * dvdr;
pj->div_v += facj * dvdr;
pi->div_v -= faci * dvdr;
pj->div_v -= facj * dvdr;
/* Compute dv cross r */
curlvr[0] = dv[1] * dx[2] - dv[2] * dx[1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment