Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Fixed bad cb index
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Aug 4, 2021
1 parent cec408a commit ffd42d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/symba/symba_discard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ subroutine symba_discard_conserve_mtm(pl, system, param, ipl, lescape_body)
class is (symba_cb)

! Add the potential and kinetic energy of the lost body to the records
pe = -cb%mass * pl%mass(ipl) / norm2(pl%xb(:, ipl) - pl%xb(:, 1))
pe = -cb%mass * pl%mass(ipl) / norm2(pl%xb(:, ipl) - cb%xb(:))
ke_orbit = 0.5_DP * pl%mass(ipl) * dot_product(pl%vb(:, ipl), pl%vb(:, ipl))
if (param%lrotation) then
ke_spin = 0.5_DP * pl%mass(ipl) * pl%radius(ipl)**2 * pl%Ip(3, ipl) * dot_product(pl%rot(:, ipl), pl%rot(:, ipl))
Expand Down

0 comments on commit ffd42d7

Please sign in to comment.