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

Commit

Permalink
Recompute Hill's sphere when calling rearray
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jan 30, 2023
1 parent af9be87 commit 268d8a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/collision/collision_resolve.f90
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ module subroutine collision_resolve_mergeaddsub(nbody_system, param, t, status)
volume = 4.0_DP/3.0_DP * PI * plnew%radius(i)**3
plnew%density(i) = fragments%mass(i) / volume
end do
call plnew%set_rhill(cb)

select case(status)
case(SUPERCATASTROPHIC)
Expand Down
4 changes: 3 additions & 1 deletion src/swiftest/swiftest_util.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ module subroutine swiftest_util_rearray_pl(self, nbody_system, param)
class(encounter_list), allocatable :: plplenc_old
logical :: lencounter

associate(pl => self, tp => nbody_system%tp, pl_adds => nbody_system%pl_adds)
associate(pl => self, tp => nbody_system%tp, cb => nbody_system%cb, pl_adds => nbody_system%pl_adds)

npl = pl%nbody
nadd = pl_adds%nbody
Expand Down Expand Up @@ -1858,6 +1858,8 @@ module subroutine swiftest_util_rearray_pl(self, nbody_system, param)
call pl%sort("mass", ascending=.false.)
call pl%flatten(param)

call pl%set_rhill(cb)

! Reset the kinship trackers
call pl%reset_kinship([(i, i=1, npl)])

Expand Down

0 comments on commit 268d8a6

Please sign in to comment.