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

Commit

Permalink
Fixed problem in SyMBA where nplm was not being updated properly afte…
Browse files Browse the repository at this point in the history
…r massive body discards
  • Loading branch information
daminton committed May 25, 2023
1 parent 2ad3c7d commit 7472c5c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/swiftest/swiftest_util.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,10 @@ module subroutine swiftest_util_rearray_pl(self, nbody_system, param)
npl = pl%nbody
end if

if (npl == 0) return
if (npl == 0) then
if (param%lmtiny_pl) pl%nplm = 0
return
end if

! Reset all of the status flags for this body
pl%status(1:npl) = ACTIVE
Expand All @@ -1696,6 +1699,7 @@ module subroutine swiftest_util_rearray_pl(self, nbody_system, param)
elsewhere
pl%info(1:npl)%particle_type = PL_TYPE_NAME
end where
pl%nplm = count(.not.pl%lmtiny(1:npl))
end if

! Reindex the new list of bodies
Expand Down

0 comments on commit 7472c5c

Please sign in to comment.