Commit 31701feb authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Zero the gravity accelerations at the first init time.

parent 7b8ceb00
...@@ -571,6 +571,9 @@ __attribute__((always_inline)) INLINE static void hydro_first_init_part( ...@@ -571,6 +571,9 @@ __attribute__((always_inline)) INLINE static void hydro_first_init_part(
xp->v_full[0] = p->v[0]; xp->v_full[0] = p->v[0];
xp->v_full[1] = p->v[1]; xp->v_full[1] = p->v[1];
xp->v_full[2] = p->v[2]; xp->v_full[2] = p->v[2];
xp->a_grav[0] = 0.f;
xp->a_grav[1] = 0.f;
xp->a_grav[2] = 0.f;
xp->u_full = p->u; xp->u_full = p->u;
hydro_reset_acceleration(p); hydro_reset_acceleration(p);
......
...@@ -597,6 +597,9 @@ __attribute__((always_inline)) INLINE static void hydro_first_init_part( ...@@ -597,6 +597,9 @@ __attribute__((always_inline)) INLINE static void hydro_first_init_part(
xp->v_full[0] = p->v[0]; xp->v_full[0] = p->v[0];
xp->v_full[1] = p->v[1]; xp->v_full[1] = p->v[1];
xp->v_full[2] = p->v[2]; xp->v_full[2] = p->v[2];
xp->a_grav[0] = 0.f;
xp->a_grav[1] = 0.f;
xp->a_grav[2] = 0.f;
hydro_reset_acceleration(p); hydro_reset_acceleration(p);
hydro_init_part(p, NULL); hydro_init_part(p, NULL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment