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

Commit

Permalink
Merge branch 'debug'
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Mar 1, 2022
2 parents 83d6814 + a7ee292 commit efbea22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/util/util_coord.f90
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ module subroutine util_coord_vh2vb_pl(self, cb)
associate(pl => self, npl => self%nbody)
Gmtot = cb%Gmass + sum(pl%Gmass(1:npl))
cb%vb(:) = 0.0_DP
do i = npl, 1, -1
cb%vb(:) = cb%vb(:) - pl%Gmass(i) * pl%vh(:, i) / Gmtot
do i = 1, npl
cb%vb(:) = cb%vb(:) - pl%Gmass(i) * pl%vh(:, i)
end do
cb%vb(:) = cb%vb(:) / Gmtot
do concurrent(i = 1:npl)
pl%vb(:, i) = pl%vh(:, i) + cb%vb(:)
end do
Expand Down

0 comments on commit efbea22

Please sign in to comment.