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

Commit

Permalink
Removed unnecessary symba_discard_tp subroutine. Flag collided bodies…
Browse files Browse the repository at this point in the history
… for discard to trigger base discard method.
  • Loading branch information
daminton committed Jul 27, 2021
1 parent 6e37462 commit 9ddf1e2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
9 changes: 0 additions & 9 deletions src/modules/symba_classes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ module symba_classes
integer(I4B), dimension(:), allocatable :: levelm !! deepest encounter level achieved this time step
contains
private
procedure, public :: discard => symba_discard_tp !! process test particle discards
procedure, public :: encounter_check => symba_encounter_check_tp !! Checks if any test particles are undergoing a close encounter with a massive body
procedure, public :: accel => symba_kick_getacch_tp !! Compute heliocentric accelerations of test particles
procedure, public :: setup => symba_setup_tp !! Constructor method - Allocates space for number of particle
Expand Down Expand Up @@ -194,14 +193,6 @@ module subroutine symba_discard_pl(self, system, param)
class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters
end subroutine symba_discard_pl

module subroutine symba_discard_tp(self, system, param)
use swiftest_classes, only : swiftest_nbody_system, swiftest_parameters
implicit none
class(symba_tp), intent(inout) :: self !! 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
end subroutine symba_discard_tp

module pure elemental subroutine symba_encounter_check_one(xr, yr, zr, vxr, vyr, vzr, rhill1, rhill2, dt, irec, lencounter, lvdotr)
implicit none
real(DP), intent(in) :: xr, yr, zr, vxr, vyr, vzr
Expand Down
1 change: 1 addition & 0 deletions src/symba/symba_collision.f90
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module subroutine symba_collision_check_pltpenc(self, system, param, t, dt, irec
where(lcollision(1:npltpenc))
pltpenc_list%status(1:npltpenc) = COLLISION
tp%status(tpind(1:npltpenc)) = DISCARDED_PLR
tp%ldiscard(tpind(1:npltpenc)) = .true.
end where
do k = 1, npltpenc
if (pltpenc_list%status(k) /= COLLISION) cycle
Expand Down
12 changes: 0 additions & 12 deletions src/symba/symba_discard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,4 @@ module subroutine symba_discard_pl(self, system, param)
return
end subroutine symba_discard_pl

module subroutine symba_discard_tp(self, system, param)
implicit none
! Arguments
class(symba_tp), intent(inout) :: self !! 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

call discard_tp(self, system, param)

return
end subroutine symba_discard_tp

end submodule s_symba_discard

0 comments on commit 9ddf1e2

Please sign in to comment.