Skip to content

Commit

Permalink
Fixed bug in integrator_whfast512.c (#760)
Browse files Browse the repository at this point in the history
Line 768-770 changed  = to -
  • Loading branch information
Ruth-Huang6012 authored Mar 19, 2024
1 parent 7a6f596 commit 4e94bc4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/integrator_whfast512.c
Original file line number Diff line number Diff line change
Expand Up @@ -765,9 +765,9 @@ static void democraticheliocentric_to_inertial_posvel(struct reb_simulation* r){
particles[s*N_per_system].x = ri_whfast512->p_jh0[s].x - x0s;
particles[s*N_per_system].y = ri_whfast512->p_jh0[s].y - y0s;
particles[s*N_per_system].z = ri_whfast512->p_jh0[s].z - z0s;
particles[s*N_per_system].vx = ri_whfast512->p_jh0[s].vx = vx0s;
particles[s*N_per_system].vy = ri_whfast512->p_jh0[s].vy = vy0s;
particles[s*N_per_system].vz = ri_whfast512->p_jh0[s].vz = vz0s;
particles[s*N_per_system].vx = ri_whfast512->p_jh0[s].vx - vx0s;
particles[s*N_per_system].vy = ri_whfast512->p_jh0[s].vy - vy0s;
particles[s*N_per_system].vz = ri_whfast512->p_jh0[s].vz - vz0s;
for (unsigned int i=1; i<N_per_system; i++){
particles[s*N_per_system+i].x = x[s*p_per_system+(i-1)] + particles[s*N_per_system].x;
particles[s*N_per_system+i].y = y[s*p_per_system+(i-1)] + particles[s*N_per_system].y;
Expand Down

0 comments on commit 4e94bc4

Please sign in to comment.