diff --git a/src/discard/discard.f90 b/src/discard/discard.f90 index 4843f9603..6609ed802 100644 --- a/src/discard/discard.f90 +++ b/src/discard/discard.f90 @@ -4,44 +4,65 @@ module subroutine discard_system(self, param) !! author: David A. Minton !! - !! Check to see if particles should be discarded based on their positions relative to the massive bodies + !! Calls the discard methods for each body class and then the write method if any discards were detected !! - !! Adapted from David E. Kaufmann's Swifter routine: discard.f90 - !! Adapted from Hal Levison's Swift routine discard.f implicit none - class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object + class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters - associate(tp => self%tp) - call tp%discard(self, param) - if (any(tp%ldiscard(1:ntp))) then - ! Spill the discards to the spill list - call tp%spill(system%tp_discards, tp%ldiscard) - call self%write_discard(param, system%tp_discards) - end if + associate(system => self, tp => self%tp, pl => self%pl) + call tp%discard(system, param) + call pl%discard(system, param) + if (any(tp%ldiscard(:) .or. any(pl%ldiscard(:)))) call system%write_discard(param) end associate + return + end subroutine discard_system - !if (self%tp%nbody == 0) return - !select type(system => self) - !class is (whm_nbody_system) - ! associate(cb => system%cb, pl => system%pl, npl => system%pl%nbody, tp => system%tp, ntp => system%tp%nbody) - ! if ((param%rmin >= 0.0_DP) .or. (param%rmax >= 0.0_DP) .or. & - ! (param%rmaxu >= 0.0_DP) .or. ((param%qmin >= 0.0_DP) .and. (param%qmin_coord == "BARY"))) then - ! if (npl > 0) call pl%h2b(cb) - ! if (ntp > 0) call tp%h2b(cb) - ! end if - ! if ((param%rmin >= 0.0_DP) .or. (param%rmax >= 0.0_DP) .or. (param%rmaxu >= 0.0_DP)) then - ! if (ntp > 0) call tp%discard_sun(system, param) - ! end if - ! if (param%qmin >= 0.0_DP .and. ntp > 0) call tp%discard_peri(system, param) - ! if (param%lclose .and. ntp > 0) call tp%discard_pl(system, param) - + module subroutine discard_pl(self, system, param) + !! author: David A. Minton + !! + !! Placeholder method for discarding massive bodies. This method does nothing except to ensure that the discard flag is set to false. + !! This method is intended to be overridden by more advanced integrators. + implicit none + ! Arguments + class(swiftest_pl), intent(inout) :: self !! Swiftest massive body object + class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameter + self%ldiscard(:) = .false. + return + end subroutine discard_pl - end associate + module subroutine discard_tp(self, system, param) + !! author: David A. Minton + !! + !! Check to see if particles should be discarded based on their positions relative to the massive bodies + !! + !! Adapted from David E. Kaufmann's Swifter routine: discard.f90 + !! Adapted from Hal Levison's Swift routine discard. + implicit none + ! Arguments + class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object + class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameter + + associate(tp => self, ntp => self%nbody, cb => system%cb, pl => system%pl, npl => system%pl%nbody) + if (ntp == 0) return + if ((param%rmin >= 0.0_DP) .or. (param%rmax >= 0.0_DP) .or. & + (param%rmaxu >= 0.0_DP) .or. ((param%qmin >= 0.0_DP) .and. (param%qmin_coord == "BARY"))) then + if (npl > 0) call pl%h2b(cb) + if (ntp > 0) call tp%h2b(cb) + end if + if ((param%rmin >= 0.0_DP) .or. (param%rmax >= 0.0_DP) .or. (param%rmaxu >= 0.0_DP)) then + if (ntp > 0) call discard_sun_tp(tp, system, param) + end if + if (param%qmin >= 0.0_DP .and. ntp > 0) call discard_peri_tp(tp, system, param) + if (param%lclose .and. ntp > 0) call discard_pl_tp(tp, system, param) + if (any(tp%ldiscard)) call tp%spill(system%tp_discards, tp%ldiscard) + end associate return - end subroutine discard_system + end subroutine discard_tp - module subroutine discard_sun_tp(self, system, param) + subroutine discard_sun_tp(tp, system, param) !! author: David A. Minton !! !! Check to see if test particles should be discarded based on their positions relative to the Sun @@ -51,14 +72,14 @@ module subroutine discard_sun_tp(self, system, param) !! Adapted from Hal Levison's Swift routine discard_sun.f implicit none ! Arguments - class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object + class(swiftest_tp), intent(inout) :: tp !! Swiftest 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 integer(I4B) :: i real(DP) :: energy, vb2, rb2, rh2, rmin2, rmax2, rmaxu2 - associate(tp => self, ntp => self%nbody, cb => system%cb, t => param%t, msys => system%msys) + associate(ntp => tp%nbody, cb => system%cb, t => param%t, msys => system%msys) rmin2 = max(param%rmin * param%rmin, cb%radius * cb%radius) rmax2 = param%rmax**2 rmaxu2 = param%rmaxu**2 @@ -90,7 +111,7 @@ module subroutine discard_sun_tp(self, system, param) return end subroutine discard_sun_tp - module subroutine discard_peri_tp(self, system, param) + subroutine discard_peri_tp(tp, system, param) !! author: David A. Minton !! !! Check to see if a test particle should be discarded because its perihelion distance becomes too small @@ -99,7 +120,7 @@ module subroutine discard_peri_tp(self, system, param) !! Adapted from Hal Levison's Swift routine discard_peri.f implicit none ! Arguments - class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object + class(swiftest_tp), intent(inout) :: tp !! Swiftest test particle object class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object class(swiftest_parameters), intent(in) :: param !! Current run configuration parameterss ! Internals @@ -108,7 +129,7 @@ module subroutine discard_peri_tp(self, system, param) real(DP) :: r2 real(DP), dimension(NDIM) :: dx - associate(cb => system%cb, tp => self, ntp => self%nbody, pl => system%pl, npl => system%pl%nbody, qmin_coord => param%qmin_coord, t => param%t, msys => system%msys) + associate(cb => system%cb, ntp => tp%nbody, pl => system%pl, npl => system%pl%nbody, qmin_coord => param%qmin_coord, t => param%t, msys => system%msys) if (lfirst) then call util_hills(npl, pl) call util_peri(lfirst, ntp, tp, cb%Gmass, msys, param%qmin_coord) @@ -142,7 +163,7 @@ module subroutine discard_peri_tp(self, system, param) end subroutine discard_peri_tp - module subroutine discard_pl_tp(self, system, param) + subroutine discard_pl_tp(tp, system, param) !! author: David A. Minton !! !! Check to see if test particles should be discarded based on their positions relative to the massive bodies @@ -151,7 +172,7 @@ module subroutine discard_pl_tp(self, system, param) !! Adapted from Hal Levison's Swift routine discard_pl.f implicit none ! Arguments - class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object + class(swiftest_tp), intent(inout) :: tp !! Swiftest 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 @@ -159,7 +180,7 @@ module subroutine discard_pl_tp(self, system, param) real(DP) :: r2min, radius real(DP), dimension(NDIM) :: dx, dv - associate(tp => self, ntp => self%nbody, pl => system%pl, npl => system%pl%nbody, t => param%t, dt => param%dt) + associate(ntp => tp%nbody, pl => system%pl, npl => system%pl%nbody, t => param%t, dt => param%dt) do i = 1, ntp if (tp%status(i) == ACTIVE) then do j = 1, npl diff --git a/src/io/io.f90 b/src/io/io.f90 index c1774f7ca..326b4950c 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -1045,7 +1045,7 @@ module subroutine io_read_initialize_system(self, param) end subroutine io_read_initialize_system - module subroutine io_write_discard(self, param, discards) + module subroutine io_write_discard(self, param) !! author: David A. Minton !! !! Write out information about discarded test particle @@ -1056,7 +1056,6 @@ module subroutine io_write_discard(self, param, discards) ! Arguments class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters - class(swiftest_body), intent(inout) :: discards !! Swiftest discard object ! Internals integer(I4B), parameter :: LUN = 40 integer(I4B) :: i, ierr @@ -1069,8 +1068,8 @@ module subroutine io_write_discard(self, param, discards) character(*), parameter :: PLNAMEFMT = '(I8, 2(1X, E23.16))' class(swiftest_body), allocatable :: pltemp - associate(t => param%t, param => param, nsp => discards%nbody, dxh => discards%xh, dvh => discards%vh, & - dname => discards%name, dstatus => discards%status) + associate(t => param%t, discards => self%tp_discards, nsp => self%tp_discards%nbody, dxh => self%tp_discards%xh, dvh => self%tp_discards%vh, & + dname => self%tp_discards%name, dstatus => self%tp_discards%status) select case(param%out_stat) case('APPEND') diff --git a/src/modules/rmvs_classes.f90 b/src/modules/rmvs_classes.f90 index 8fc57cadf..e595af5fe 100644 --- a/src/modules/rmvs_classes.f90 +++ b/src/modules/rmvs_classes.f90 @@ -68,7 +68,7 @@ module rmvs_classes integer(I4B) :: ipleP !! index value of encountering planet logical :: lplanetocentric = .false. !! Flag that indicates that the object is a planetocentric set of masive bodies used for close encounter calculations contains - procedure, public :: discard_pl => rmvs_discard_pl_tp + procedure, public :: discard => rmvs_discard_tp !! Check to see if test particles should be discarded based on pericenter passage distances with respect to planets encountered procedure, public :: encounter_check => rmvs_encounter_check_tp !! Checks if any test particles are undergoing a close encounter with a massive body procedure, public :: fill => rmvs_fill_tp !! "Fills" bodies from one object into another depending on the results of a mask (uses the MERGE intrinsic) procedure, public :: getacch => rmvs_getacch_tp !! Calculates either the standard or modified version of the acceleration depending if the @@ -97,13 +97,13 @@ module rmvs_classes end type rmvs_pl interface - module subroutine rmvs_discard_pl_tp(self, system, param) + module subroutine rmvs_discard_tp(self, system, param) use swiftest_classes, only : swiftest_nbody_system, swiftest_parameters implicit none class(rmvs_tp), intent(inout) :: self !! RMVS 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 rmvs_discard_pl_tp + end subroutine rmvs_discard_tp module function rmvs_encounter_check_tp(self, system, dt) result(lencounter) implicit none diff --git a/src/modules/swiftest_classes.f90 b/src/modules/swiftest_classes.f90 index 4476b1e7e..ad0a17598 100644 --- a/src/modules/swiftest_classes.f90 +++ b/src/modules/swiftest_classes.f90 @@ -6,7 +6,7 @@ module swiftest_classes use swiftest_globals implicit none private - public :: discard_pl_tp, discard_sun_tp, discard_system + public :: discard_pl, discard_system, discard_tp public :: drift_one public :: eucl_dist_index_plpl, eucl_dist_index_pltp, eucl_irij3_plpl public :: kick_vb_body, kick_vh_body @@ -184,32 +184,32 @@ module swiftest_classes !> An abstract class for a generic collection of Swiftest massive bodies type, abstract, public, extends(swiftest_body) :: swiftest_pl !! Superclass that defines the generic elements of a Swiftest particle - real(DP), dimension(:), allocatable :: mass !! Body mass (units MU) - real(DP), dimension(:), allocatable :: Gmass !! Mass gravitational term G * mass (units GU * MU) - real(DP), dimension(:), allocatable :: rhill !! Body mass (units MU) - real(DP), dimension(:), allocatable :: radius !! Body radius (units DU) - real(DP), dimension(:), allocatable :: density !! Body mass density - calculated internally (units MU / DU**3) - real(DP), dimension(:,:), allocatable :: Ip !! Unitless principal moments of inertia (I1, I2, I3) / (MR**2). - !! Principal axis rotation assumed. - real(DP), dimension(:,:), allocatable :: rot !! Body rotation vector in inertial coordinate frame (units rad / TU) - real(DP), dimension(:), allocatable :: k2 !! Tidal Love number - real(DP), dimension(:), allocatable :: Q !! Tidal quality factor - integer(I4B) :: num_comparisons !! Number of pl-pl Euclidean distance comparisons - integer(I4B), dimension(:,:), allocatable :: k_eucl !! Index array that converts i, j array indices into k index for use in - !! the Euclidean distance matrix - real(DP), dimension(:), allocatable :: irij3 !! 1.0_DP / (rji2 * sqrt(rji2)) where rji2 is the square of the Euclidean distance + real(DP), dimension(:), allocatable :: mass !! Body mass (units MU) + real(DP), dimension(:), allocatable :: Gmass !! Mass gravitational term G * mass (units GU * MU) + real(DP), dimension(:), allocatable :: rhill !! Body mass (units MU) + real(DP), dimension(:), allocatable :: radius !! Body radius (units DU) + real(DP), dimension(:), allocatable :: density !! Body mass density - calculated internally (units MU / DU**3) + real(DP), dimension(:,:), allocatable :: Ip !! Unitless principal moments of inertia (I1, I2, I3) / (MR**2). + !! Principal axis rotation assumed. + real(DP), dimension(:,:), allocatable :: rot !! Body rotation vector in inertial coordinate frame (units rad / TU) + real(DP), dimension(:), allocatable :: k2 !! Tidal Love number + real(DP), dimension(:), allocatable :: Q !! Tidal quality factor + integer(I4B) :: num_comparisons !! Number of pl-pl Euclidean distance comparisons + integer(I4B), dimension(:,:), allocatable :: k_eucl !! Index array that converts i, j array indices into k index for use in + !! the Euclidean distance matrix + real(DP), dimension(:), allocatable :: irij3 !! 1.0_DP / (rji2 * sqrt(rji2)) where rji2 is the square of the Euclidean distance !! Note to developers: If you add components to this class, be sure to update methods and subroutines that traverse the !! component list, such as setup_pl and util_spill_pl contains private ! Massive body-specific concrete methods ! These are concrete because they are the same implemenation for all integrators - + procedure, public :: discard => discard_pl !! Placeholder method for discarding massive bodies procedure, public :: eucl_index => eucl_dist_index_plpl !! Sets up the (i, j) -> k indexing used for the single-loop blocking Euclidean distance matrix procedure, public :: eucl_irij3 => eucl_irij3_plpl !! Parallelized single loop blocking for Euclidean distance matrix calcualtion procedure, public :: setup => setup_pl !! A base constructor that sets the number of bodies and allocates and initializes all arrays procedure, public :: set_mu => setup_set_mu_pl !! Method used to construct the vectorized form of the central body mass - procedure, public :: set_rhill => setup_set_rhill + procedure, public :: set_rhill => setup_set_rhill !! Calculates the Hill's radii for each body procedure, public :: h2b => util_coord_h2b_pl !! Convert massive bodies from heliocentric to barycentric coordinates (position and velocity) procedure, public :: b2h => util_coord_b2h_pl !! Convert massive bodies from barycentric to heliocentric coordinates (position and velocity) procedure, public :: copy => util_copy_pl !! Copies elements of one object to another. @@ -233,17 +233,15 @@ module swiftest_classes private ! Test particle-specific concrete methods ! These are concrete because they are the same implemenation for all integrators - procedure, public :: discard_sun => discard_sun_tp !! Check to see if test particles should be discarded based on their positions relative to the Sun - procedure, public :: discard_peri => discard_peri_tp !! Check to see if a test particle should be discarded because its perihelion distance becomes too small - procedure, public :: discard_pl => discard_pl_tp !! Check to see if test particles should be discarded based on their positions relative to the massive bodies - procedure, public :: eucl_index => eucl_dist_index_pltp !! Sets up the (i, j) -> k indexing used for the single-loop blocking Euclidean distance matrix - procedure, public :: setup => setup_tp !! A base constructor that sets the number of bodies and - procedure, public :: set_mu => setup_set_mu_tp !! Method used to construct the vectorized form of the central body mass - procedure, public :: h2b => util_coord_h2b_tp !! Convert test particles from heliocentric to barycentric coordinates (position and velocity) - procedure, public :: b2h => util_coord_b2h_tp !! Convert test particles from barycentric to heliocentric coordinates (position and velocity) - procedure, public :: copy => util_copy_tp !! Copies elements of one object to another. - procedure, public :: fill => util_fill_tp !! "Fills" bodies from one object into another depending on the results of a mask (uses the MERGE intrinsic) - procedure, public :: spill => util_spill_tp !! "Spills" bodies from one object to another depending on the results of a mask (uses the PACK intrinsic) + procedure, public :: discard => discard_tp !! Check to see if test particles should be discarded based on their positions relative to the massive bodies + procedure, public :: eucl_index => eucl_dist_index_pltp !! Sets up the (i, j) -> k indexing used for the single-loop blocking Euclidean distance matrix + procedure, public :: setup => setup_tp !! A base constructor that sets the number of bodies and + procedure, public :: set_mu => setup_set_mu_tp !! Method used to construct the vectorized form of the central body mass + procedure, public :: h2b => util_coord_h2b_tp !! Convert test particles from heliocentric to barycentric coordinates (position and velocity) + procedure, public :: b2h => util_coord_b2h_tp !! Convert test particles from barycentric to heliocentric coordinates (position and velocity) + procedure, public :: copy => util_copy_tp !! Copies elements of one object to another. + procedure, public :: fill => util_fill_tp !! "Fills" bodies from one object into another depending on the results of a mask (uses the MERGE intrinsic) + procedure, public :: spill => util_spill_tp !! "Spills" bodies from one object to another depending on the results of a mask (uses the PACK intrinsic) end type swiftest_tp !******************************************************************************************************************************** @@ -255,6 +253,7 @@ module swiftest_classes class(swiftest_cb), allocatable :: cb !! Central body data structure class(swiftest_pl), allocatable :: pl !! Massive body data structure class(swiftest_tp), allocatable :: tp !! Test particle data structure + class(swiftest_tp), allocatable :: tp_discards !! Discarded test particle data structure real(DP) :: msys = 0.0_DP !! Total system mass - used for barycentric coordinate conversion real(DP) :: ke = 0.0_DP !! System kinetic energy real(DP) :: pe = 0.0_DP !! System potential energy @@ -284,10 +283,11 @@ subroutine abstract_copy(self, src, mask) logical, dimension(:), intent(in) :: mask end subroutine abstract_copy - subroutine abstract_discard_body(self, param) - import swiftest_body, swiftest_parameters - class(swiftest_body), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters + subroutine abstract_discard_body(self, system, param) + import swiftest_body, swiftest_nbody_system, swiftest_parameters + class(swiftest_body), intent(inout) :: self !! Swiftest 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 abstract_discard_body subroutine abstract_initialize(self, param) @@ -332,39 +332,32 @@ end subroutine abstract_step_system subroutine abstract_write_frame(self, iu, param) import DP, I4B, swiftest_base, swiftest_parameters - class(swiftest_base), intent(in) :: self !! Swiftest base object - integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to + class(swiftest_base), intent(in) :: self !! Swiftest base object + integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters end subroutine abstract_write_frame end interface interface - module subroutine discard_peri_tp(self, system, param) + module subroutine discard_pl(self, system, param) implicit none - class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object + class(swiftest_pl), intent(inout) :: self !! Swiftest massive body object class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object class(swiftest_parameters), intent(in) :: param !! Current run configuration parameter - end subroutine discard_peri_tp + end subroutine discard_pl - module subroutine discard_pl_tp(self, system, param) + module subroutine discard_system(self, param) implicit none - class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object - class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object - class(swiftest_parameters), intent(in) :: param !! Current run configuration parameter - end subroutine discard_pl_tp + class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters + end subroutine discard_system - module subroutine discard_sun_tp(self, system, param) + module subroutine discard_tp(self, system, param) implicit none class(swiftest_tp), intent(inout) :: self !! Swiftest 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 discard_sun_tp - - module subroutine discard_system(self, param) - implicit none - class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters - end subroutine discard_system + end subroutine discard_tp module pure elemental subroutine drift_one(mu, px, py, pz, vx, vy, vz, dt, iflag) implicit none @@ -502,11 +495,11 @@ module subroutine io_read_initialize_system(self, param) class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters end subroutine io_read_initialize_system - module subroutine io_write_discard(self, param, discards) + module subroutine io_write_discard(self, param) implicit none - class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters - class(swiftest_body), intent(inout) :: discards !! Swiftest discard object + class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters + !class(swiftest_body), intent(inout) :: discards !! Swiftest discard object end subroutine io_write_discard module subroutine io_write_encounter(t, name1, name2, mass1, mass2, radius1, radius2, & diff --git a/src/modules/whm_classes.f90 b/src/modules/whm_classes.f90 index 031318161..1707ef875 100644 --- a/src/modules/whm_classes.f90 +++ b/src/modules/whm_classes.f90 @@ -77,7 +77,6 @@ module whm_classes !> An abstract class for the WHM integrator nbody system type, public, extends(swiftest_nbody_system) :: whm_nbody_system !> In the WHM integrator, only test particles are discarded - class(whm_tp), allocatable :: tp_discards !! WHM test particle object that real(DP), dimension(:,:), allocatable :: xbeg, xend !! Positions of massive bodies at beginning and end of a step. Required in order to separate the test particle step from the massive body step contains private diff --git a/src/rmvs/rmvs_discard.f90 b/src/rmvs/rmvs_discard.f90 index dc8b4b9bb..6dacd7969 100644 --- a/src/rmvs/rmvs_discard.f90 +++ b/src/rmvs/rmvs_discard.f90 @@ -1,11 +1,10 @@ submodule(rmvs_classes) s_rmvs_discard use swiftest contains - module subroutine rmvs_discard_pl_tp(self, system, param) + module subroutine rmvs_discard_tp(self, system, param) !! author: David A. Minton !! - !! Check to see if test particles should be discarded based on pericenter passage distances with respect to - !! planets encountered + !! Check to see if test particles should be discarded based on pericenter passage distances with respect to planets encountered !! !! Adapted from Hal Levison's Swift routine discard_pl.f !! Adapted from Hal Levison's Swift routine rmvs_discard_pl.f90 @@ -29,8 +28,9 @@ module subroutine rmvs_discard_pl_tp(self, system, param) end if end associate end do - call discard_pl_tp(tp, system, param) + ! Call the base method that this overrides + call discard_tp(tp, system, param) end associate - end subroutine rmvs_discard_pl_tp + end subroutine rmvs_discard_tp end submodule s_rmvs_discard \ No newline at end of file