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

Commit

Permalink
Save dinon pl-pl collsion discarded bodies to pl_discards
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Aug 19, 2021
1 parent 87239f0 commit eecfde4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/symba/symba_discard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,21 @@ subroutine symba_discard_nonplpl(pl, system, param)
class(symba_pl), intent(inout) :: pl !! SyMBA test particle object
class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters
! Internals
logical, dimension(pl%nbody) :: ldiscard

! First check for collisions with the central body
associate(npl => pl%nbody, cb => system%cb)
if (npl == 0) return
ldiscard(1:npl) = pl%ldiscard(1:npl) ! Don't include any bodies that were previously flagged for discard in here
if ((param%rmin >= 0.0_DP) .or. (param%rmax >= 0.0_DP) .or. (param%rmaxu >= 0.0_DP)) then
call symba_discard_cb_pl(pl, system, param)
end if
if (param%qmin >= 0.0_DP .and. npl > 0) call symba_discard_peri_pl(pl, system, param)
if (any(.not.ldiscard(1:npl) .and. pl%ldiscard(1:npl))) then
ldiscard(1:npl) = .not.ldiscard(1:npl) .and. pl%ldiscard(1:npl)
call system%pl_discards%append(pl, ldiscard)
end if
end associate

return
Expand Down
1 change: 0 additions & 1 deletion src/symba/symba_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ module subroutine symba_io_read_particle(system, param)
end if
end if
if (.not.lmatch) then
write(*,*) 'Particle id ',id,' not found. Skipping'
read(LUN, err = 667, iomsg = errmsg) tmpinfo
end if
end do
Expand Down

0 comments on commit eecfde4

Please sign in to comment.