From 9ddf1e2ae90696a471ffcd842f8933a98798bd66 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 27 Jul 2021 11:57:42 -0400 Subject: [PATCH] Removed unnecessary symba_discard_tp subroutine. Flag collided bodies for discard to trigger base discard method. --- src/modules/symba_classes.f90 | 9 --------- src/symba/symba_collision.f90 | 1 + src/symba/symba_discard.f90 | 12 ------------ 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/modules/symba_classes.f90 b/src/modules/symba_classes.f90 index 86ccb38a2..0a6dcb290 100644 --- a/src/modules/symba_classes.f90 +++ b/src/modules/symba_classes.f90 @@ -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 @@ -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 diff --git a/src/symba/symba_collision.f90 b/src/symba/symba_collision.f90 index a1662b661..59f43c69c 100644 --- a/src/symba/symba_collision.f90 +++ b/src/symba/symba_collision.f90 @@ -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 diff --git a/src/symba/symba_discard.f90 b/src/symba/symba_discard.f90 index a71ee747a..3f8ada6fe 100644 --- a/src/symba/symba_discard.f90 +++ b/src/symba/symba_discard.f90 @@ -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 \ No newline at end of file