Skip to content

Commit

Permalink
Model correction.
Browse files Browse the repository at this point in the history
  • Loading branch information
dishangti committed Jun 26, 2023
1 parent f2fe843 commit 2b8cfb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ThreeBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ pair<R3, R3> RK4(R3 &s0, R3 &v0, int except)
R3 &&k1v = a_func(s0, except);
R3 &&k1s = move(v0);

R3 &&k2v = a_func(s0 + k1v * per2, except);
R3 &&k2v = a_func(s0 + k1s * per2, except);
R3 &&k2s = v0 + k1v * per2;

R3 &&k3v = a_func(s0 + k2v * per2, except);
R3 &&k3v = a_func(s0 + k2s * per2, except);
R3 &&k3s = v0 + k2v * per2;

R3 &&k4v = a_func(s0 + k3v * per, except);
R3 &&k4v = a_func(s0 + k3s * per, except);
R3 &&k4s = v0 + k3v * per;

return pair<R3, R3>(s0 + (k1s + (k2s + k3s) * 2 + k4s) * (per / 6),
Expand Down

0 comments on commit 2b8cfb8

Please sign in to comment.