From a6ca94045e15a940e19591be6f5db31a0b37bc62 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Mon, 26 Jul 2021 14:23:32 -0400 Subject: [PATCH] Refactored codebase to place getacc subroutines inside of kick. Next I will include accel method calls inside of kicks to simplify the algorithms and fix an issue specific to SyMBA in which don't want to reset accelerations to 0 before calling the helio getacch methods --- src/gr/gr.f90 | 6 +- src/helio/helio_getacch.f90 | 69 ------------------ src/helio/helio_kick.f90 | 77 ++++++++++++++++++-- src/kick/kick.f90 | 12 +-- src/modules/helio_classes.f90 | 24 +++--- src/modules/rmvs_classes.f90 | 6 +- src/modules/swiftest_classes.f90 | 36 ++++----- src/modules/symba_classes.f90 | 10 ++- src/modules/whm_classes.f90 | 24 +++--- src/rmvs/{rmvs_getacch.f90 => rmvs_kick.f90} | 14 ++-- src/symba/symba_getacch.f90 | 28 +++---- src/tides/tides_getacch_pl.f90 | 8 +- src/user/user_getacch.f90 | 10 +-- src/whm/whm_gr.f90 | 12 +-- src/whm/{whm_getacch.f90 => whm_kick.f90} | 42 +++++------ 15 files changed, 188 insertions(+), 190 deletions(-) delete mode 100644 src/helio/helio_getacch.f90 rename src/rmvs/{rmvs_getacch.f90 => rmvs_kick.f90} (91%) rename src/whm/{whm_getacch.f90 => whm_kick.f90} (82%) diff --git a/src/gr/gr.f90 b/src/gr/gr.f90 index 7d794bf2b..cf13d90d2 100644 --- a/src/gr/gr.f90 +++ b/src/gr/gr.f90 @@ -1,7 +1,7 @@ submodule(swiftest_classes) s_gr use swiftest contains - module pure subroutine gr_getaccb_ns_body(self, system, param) + module pure subroutine gr_kick_getaccb_ns_body(self, system, param) !! author: David A. Minton !! !! Add relativistic correction acceleration for non-symplectic integrators. @@ -11,7 +11,7 @@ module pure subroutine gr_getaccb_ns_body(self, system, param) !! Quinn, T.R., Tremaine, S., Duncan, M., 1991. A three million year integration of the earth’s orbit. !! AJ 101, 2287–2305. https://doi.org/10.1086/115850 !! - !! Adapted from David A. Minton's Swifter routine routine gr_getaccb_ns.f90 + !! Adapted from David A. Minton's Swifter routine routine gr_kick_getaccb_ns.f90 implicit none ! Arguments class(swiftest_body), intent(inout) :: self !! Swiftest generic body object @@ -41,7 +41,7 @@ module pure subroutine gr_getaccb_ns_body(self, system, param) return - end subroutine gr_getaccb_ns_body + end subroutine gr_kick_getaccb_ns_body module pure subroutine gr_p4_pos_kick(param, x, v, dt) !! author: David A. Minton diff --git a/src/helio/helio_getacch.f90 b/src/helio/helio_getacch.f90 deleted file mode 100644 index 968d2c0c0..000000000 --- a/src/helio/helio_getacch.f90 +++ /dev/null @@ -1,69 +0,0 @@ -submodule (helio_classes) s_helio_getacch - use swiftest -contains - module subroutine helio_getacch_pl(self, system, param, t, lbeg) - !! author: David A. Minton - !! - !! Compute heliocentric accelerations of massive bodies - !! - !! Adapted from David E. Kaufmann's Swifter routine helio_getacch.f90 - !! Adapted from Hal Levison's Swift routine helio_getacch.f - implicit none - ! Arguments - class(helio_pl), intent(inout) :: self !! Helio massive body particle data structure - class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object - class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters - real(DP), intent(in) :: t !! Current simulation time - logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step - - associate(cb => system%cb, pl => self, npl => self%nbody) - pl%ah(:,:) = 0.0_DP - call pl%accel_int() - if (param%loblatecb) then - cb%aoblbeg = cb%aobl - call pl%accel_obl(system) - cb%aoblend = cb%aobl - if (param%ltides) then - cb%atidebeg = cb%atide - call pl%accel_tides(system) - cb%atideend = cb%atide - end if - end if - if (param%lextra_force) call pl%accel_user(system, param, t) - !if (param%lgr) call pl%gr_accel(param) - end associate - - return - end subroutine helio_getacch_pl - - module subroutine helio_getacch_tp(self, system, param, t, lbeg) - !! author: David A. Minton - !! - !! Compute heliocentric accelerations of test particles - !! - !! Adapted from David E. Kaufmann's Swifter routine helio_getacch_tp.f90 - !! Adapted from Hal Levison's Swift routine helio_getacch_tp.f - implicit none - ! Arguments - class(helio_tp), intent(inout) :: self !! Helio test particle data structure - class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object - class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters - real(DP), intent(in) :: t !! Current time - logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step - - associate(tp => self, cb => system%cb, pl => system%pl, npl => system%pl%nbody) - tp%ah(:,:) = 0.0_DP - if (present(lbeg)) system%lbeg = lbeg - if (system%lbeg) then - call tp%accel_int(pl%Gmass(:), pl%xbeg(:,:), npl) - else - call tp%accel_int(pl%Gmass(:), pl%xend(:,:), npl) - end if - if (param%loblatecb) call tp%accel_obl(system) - if (param%lextra_force) call tp%accel_user(system, param, t) - !if (param%lgr) call tp%gr_accel(param) - end associate - return - end subroutine helio_getacch_tp - -end submodule s_helio_getacch diff --git a/src/helio/helio_kick.f90 b/src/helio/helio_kick.f90 index 9d5cea3a6..a4cd86d1d 100644 --- a/src/helio/helio_kick.f90 +++ b/src/helio/helio_kick.f90 @@ -1,13 +1,78 @@ submodule(helio_classes) s_helio_kick use swiftest contains - module subroutine helio_kickvb_pl(self, dt) +module subroutine helio_kick_getacch_pl(self, system, param, t, lbeg) + !! author: David A. Minton + !! + !! Compute heliocentric accelerations of massive bodies + !! + !! Adapted from David E. Kaufmann's Swifter routine helio_kick_getacch.f90 + !! Adapted from Hal Levison's Swift routine helio_kick_getacch.f + implicit none + ! Arguments + class(helio_pl), intent(inout) :: self !! Helio massive body particle data structure + class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters + real(DP), intent(in) :: t !! Current simulation time + logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step + + associate(cb => system%cb, pl => self, npl => self%nbody) + pl%ah(:,:) = 0.0_DP + call pl%accel_int() + if (param%loblatecb) then + cb%aoblbeg = cb%aobl + call pl%accel_obl(system) + cb%aoblend = cb%aobl + if (param%ltides) then + cb%atidebeg = cb%atide + call pl%accel_tides(system) + cb%atideend = cb%atide + end if + end if + if (param%lextra_force) call pl%accel_user(system, param, t) + !if (param%lgr) call pl%gr_accel(param) + end associate + + return + end subroutine helio_kick_getacch_pl + + module subroutine helio_kick_getacch_tp(self, system, param, t, lbeg) + !! author: David A. Minton + !! + !! Compute heliocentric accelerations of test particles + !! + !! Adapted from David E. Kaufmann's Swifter routine helio_kick_getacch_tp.f90 + !! Adapted from Hal Levison's Swift routine helio_kick_getacch_tp.f + implicit none + ! Arguments + class(helio_tp), intent(inout) :: self !! Helio test particle data structure + class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters + real(DP), intent(in) :: t !! Current time + logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step + + associate(tp => self, cb => system%cb, pl => system%pl, npl => system%pl%nbody) + tp%ah(:,:) = 0.0_DP + if (present(lbeg)) system%lbeg = lbeg + if (system%lbeg) then + call tp%accel_int(pl%Gmass(:), pl%xbeg(:,:), npl) + else + call tp%accel_int(pl%Gmass(:), pl%xend(:,:), npl) + end if + if (param%loblatecb) call tp%accel_obl(system) + if (param%lextra_force) call tp%accel_user(system, param, t) + !if (param%lgr) call tp%gr_accel(param) + end associate + return + end subroutine helio_kick_getacch_tp + + module subroutine helio_kick_vb_pl(self, dt) !! author: David A. Minton !! !! Kick barycentric velocities of bodies !! !! Adapted from Martin Duncan and Hal Levison's Swift routine kickvh.f - !! Adapted from David E. Kaufmann's Swifter routine helio_kickvb.f90 + !! Adapted from David E. Kaufmann's Swifter routine helio_kick_vb.f90 implicit none ! Arguments class(helio_pl), intent(inout) :: self !! Swiftest generic body object @@ -24,15 +89,15 @@ module subroutine helio_kickvb_pl(self, dt) return - end subroutine helio_kickvb_pl + end subroutine helio_kick_vb_pl - module subroutine helio_kickvb_tp(self, dt) + module subroutine helio_kick_vb_tp(self, dt) !! author: David A. Minton !! !! Kick barycentric velocities of bodies !! !! Adapted from Martin Duncan and Hal Levison's Swift routine kickvh_tp.f - !! Adapted from David E. Kaufmann's Swifter routine helio_kickvb_tp.f90 + !! Adapted from David E. Kaufmann's Swifter routine helio_kick_vb_tp.f90 implicit none ! Arguments class(helio_tp), intent(inout) :: self !! Swiftest generic body object @@ -49,5 +114,5 @@ module subroutine helio_kickvb_tp(self, dt) return - end subroutine helio_kickvb_tp + end subroutine helio_kick_vb_tp end submodule s_helio_kick \ No newline at end of file diff --git a/src/kick/kick.f90 b/src/kick/kick.f90 index 58ebfd1aa..3d57f2d1c 100644 --- a/src/kick/kick.f90 +++ b/src/kick/kick.f90 @@ -1,13 +1,13 @@ submodule(swiftest_classes) s_kick use swiftest contains - module pure subroutine kick_getacch_int_pl(self) + module pure subroutine kick_kick_getacch_int_pl(self) !! author: David A. Minton !! !! Compute direct cross (third) term heliocentric accelerations of massive bodies !! !! Adapted from Hal Levison's Swift routine getacch_ah3.f - !! Adapted from David E. Kaufmann's Swifter routine whm_getacch_ah3.f90 and helio_getacch_int.f90 + !! Adapted from David E. Kaufmann's Swifter routine whm_kick_getacch_ah3.f90 and helio_kick_getacch_int.f90 implicit none ! Arguments class(swiftest_pl), intent(inout) :: self @@ -31,15 +31,15 @@ module pure subroutine kick_getacch_int_pl(self) end associate return - end subroutine kick_getacch_int_pl + end subroutine kick_kick_getacch_int_pl - module pure subroutine kick_getacch_int_tp(self, GMpl, xhp, npl) + module pure subroutine kick_kick_getacch_int_tp(self, GMpl, xhp, npl) !! author: David A. Minton !! !! Compute direct cross (third) term heliocentric accelerations of test particles by massive bodies !! !! Adapted from Hal Levison's Swift routine getacch_ah3_tp.f - !! Adapted from David E. Kaufmann's Swifter routine whm_getacch_ah3.f90 and helio_getacch_int_tp.f90 + !! Adapted from David E. Kaufmann's Swifter routine whm_kick_getacch_ah3.f90 and helio_kick_getacch_int_tp.f90 implicit none ! Arguments class(swiftest_tp), intent(inout) :: self !! Swiftest test particle @@ -62,7 +62,7 @@ module pure subroutine kick_getacch_int_tp(self, GMpl, xhp, npl) end do end associate return - end subroutine kick_getacch_int_tp + end subroutine kick_kick_getacch_int_tp module subroutine kick_vh_body(self, dt) !! author: David A. Minton diff --git a/src/modules/helio_classes.f90 b/src/modules/helio_classes.f90 index 17366e88f..39d1e30e4 100644 --- a/src/modules/helio_classes.f90 +++ b/src/modules/helio_classes.f90 @@ -38,8 +38,8 @@ module helio_classes procedure, public :: vb2vh => helio_coord_vb2vh_pl !! Convert massive bodies from barycentric to heliocentric coordinates (velocity only) procedure, public :: drift => helio_drift_pl !! Method for Danby drift in Democratic Heliocentric coordinates procedure, public :: lindrift => helio_drift_linear_pl !! Method for linear drift of massive bodies due to barycentric momentum of Sun - procedure, public :: accel => helio_getacch_pl !! Compute heliocentric accelerations of massive bodies - procedure, public :: kick => helio_kickvb_pl !! Kicks the barycentric velocities + procedure, public :: accel => helio_kick_getacch_pl !! Compute heliocentric accelerations of massive bodies + procedure, public :: kick => helio_kick_vb_pl !! Kicks the barycentric velocities procedure, public :: step => helio_step_pl !! Steps the body forward one stepsize end type helio_pl @@ -54,8 +54,8 @@ module helio_classes procedure, public :: vb2vh => helio_coord_vb2vh_tp !! Convert test particles from barycentric to heliocentric coordinates (velocity only) procedure, public :: lindrift => helio_drift_linear_tp !! Method for linear drift of massive bodies due to barycentric momentum of Sun procedure, public :: drift => helio_drift_tp !! Method for Danby drift in Democratic Heliocentric coordinates - procedure, public :: accel => helio_getacch_tp !! Compute heliocentric accelerations of massive bodies - procedure, public :: kick => helio_kickvb_tp !! Kicks the barycentric velocities + procedure, public :: accel => helio_kick_getacch_tp !! Compute heliocentric accelerations of massive bodies + procedure, public :: kick => helio_kick_vb_tp !! Kicks the barycentric velocities procedure, public :: step => helio_step_tp !! Steps the body forward one stepsize end type helio_tp @@ -132,7 +132,7 @@ module subroutine helio_drift_linear_tp(self, cb, dt, lbeg) logical, intent(in) :: lbeg !! Argument that determines whether or not this is the beginning or end of the step end subroutine helio_drift_linear_tp - module subroutine helio_getacch_pl(self, system, param, t, lbeg) + module subroutine helio_kick_getacch_pl(self, system, param, t, lbeg) use swiftest_classes, only : swiftest_parameters, swiftest_nbody_system implicit none class(helio_pl), intent(inout) :: self !! Helio massive body object @@ -140,9 +140,9 @@ module subroutine helio_getacch_pl(self, system, param, t, lbeg) class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters real(DP), intent(in) :: t !! Current simulation time logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step - end subroutine helio_getacch_pl + end subroutine helio_kick_getacch_pl - module subroutine helio_getacch_tp(self, system, param, t, lbeg) + module subroutine helio_kick_getacch_tp(self, system, param, t, lbeg) use swiftest_classes, only : swiftest_parameters, swiftest_nbody_system implicit none class(helio_tp), intent(inout) :: self !! Helio test particle object @@ -150,19 +150,19 @@ module subroutine helio_getacch_tp(self, system, param, t, lbeg) class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters real(DP), intent(in) :: t !! Current time logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step - end subroutine helio_getacch_tp + end subroutine helio_kick_getacch_tp - module subroutine helio_kickvb_pl(self, dt) + module subroutine helio_kick_vb_pl(self, dt) implicit none class(helio_pl), intent(inout) :: self !! Helio massive body object real(DP), intent(in) :: dt !! Stepsize - end subroutine helio_kickvb_pl + end subroutine helio_kick_vb_pl - module subroutine helio_kickvb_tp(self, dt) + module subroutine helio_kick_vb_tp(self, dt) implicit none class(helio_tp), intent(inout) :: self !! Helio test particle object real(DP), intent(in) :: dt !! Stepsize - end subroutine helio_kickvb_tp + end subroutine helio_kick_vb_tp module subroutine helio_step_pl(self, system, param, t, dt) use swiftest_classes, only : swiftest_nbody_system, swiftest_parameters diff --git a/src/modules/rmvs_classes.f90 b/src/modules/rmvs_classes.f90 index 8d0fb1f18..a459e7246 100644 --- a/src/modules/rmvs_classes.f90 +++ b/src/modules/rmvs_classes.f90 @@ -71,7 +71,7 @@ module rmvs_classes 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_util_fill_tp !! "Fills" bodies from one object into another depending on the results of a mask (uses the MERGE intrinsic) - procedure, public :: accel => rmvs_getacch_tp !! Calculates either the standard or modified version of the acceleration depending if the + procedure, public :: accel => rmvs_kick_getacch_tp !! Calculates either the standard or modified version of the acceleration depending if the !! if the test particle is undergoing a close encounter or not procedure, public :: setup => rmvs_setup_tp !! Constructor method - Allocates space for number of particles procedure, public :: spill => rmvs_util_spill_tp !! "Spills" bodies from one object to another depending on the results of a mask (uses the PACK intrinsic) @@ -136,7 +136,7 @@ module subroutine rmvs_util_fill_tp(self, inserts, lfill_list) logical, dimension(:), intent(in) :: lfill_list !! Logical array of bodies to merge into the keeps end subroutine rmvs_util_fill_tp - module subroutine rmvs_getacch_tp(self, system, param, t, lbeg) + module subroutine rmvs_kick_getacch_tp(self, system, param, t, lbeg) use swiftest_classes, only : swiftest_nbody_system, swiftest_parameters implicit none class(rmvs_tp), intent(inout) :: self !! RMVS test particle data structure @@ -144,7 +144,7 @@ module subroutine rmvs_getacch_tp(self, system, param, t, lbeg) class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters real(DP), intent(in) :: t !! Current time logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step - end subroutine rmvs_getacch_tp + end subroutine rmvs_kick_getacch_tp module subroutine rmvs_setup_pl(self,n) implicit none diff --git a/src/modules/swiftest_classes.f90 b/src/modules/swiftest_classes.f90 index 5c6b83bdc..d09bd15bd 100644 --- a/src/modules/swiftest_classes.f90 +++ b/src/modules/swiftest_classes.f90 @@ -9,16 +9,16 @@ module swiftest_classes public :: discard_pl, discard_system, discard_tp public :: drift_all, drift_body, drift_one public :: eucl_dist_index_plpl - public :: gr_getaccb_ns_body, gr_p4_pos_kick, gr_pseudovel2vel, gr_vel2pseudovel + public :: gr_kick_getaccb_ns_body, gr_p4_pos_kick, gr_pseudovel2vel, gr_vel2pseudovel public :: io_dump_param, io_dump_swiftest, io_dump_system, io_get_args, io_get_token, io_param_reader, io_param_writer, io_read_body_in, & io_read_cb_in, io_read_param_in, io_read_frame_body, io_read_frame_cb, io_read_frame_system, & io_toupper, io_write_discard, io_write_encounter, io_write_frame_body, io_write_frame_cb, io_write_frame_system - public :: kick_getacch_int_pl, kick_vh_body + public :: kick_kick_getacch_int_pl, kick_vh_body public :: obl_acc_body, obl_acc_pl, obl_acc_tp public :: orbel_el2xv_vec, orbel_xv2el_vec, orbel_scget, orbel_xv2aeq, orbel_xv2aqt public :: setup_body, setup_construct_system, setup_initialize_system, setup_pl, setup_tp - public :: tides_getacch_pl, tides_step_spin_system - public :: user_getacch_body + public :: tides_kick_getacch_pl, tides_step_spin_system + public :: user_kick_getacch_body public :: util_coord_b2h_pl, util_coord_b2h_tp, util_coord_h2b_pl, util_coord_h2b_tp, util_exit, util_fill_body, util_fill_pl, util_fill_tp, & util_index, util_peri_tp, util_reverse_status, util_set_beg_end_pl, util_set_ir3h, util_set_msys, util_set_mu_pl, & util_set_mu_tp, util_set_rhill, util_set_rhill_approximate, util_sort, util_spill_body, util_spill_pl, util_spill_tp, util_valid, util_version @@ -183,7 +183,7 @@ module swiftest_classes procedure, public :: xv2el => orbel_xv2el_vec !! Convert position and velocity vectors to orbital elements procedure, public :: set_ir3 => util_set_ir3h !! Sets the inverse heliocentric radius term (1/rh**3) procedure, public :: setup => setup_body !! A constructor that sets the number of bodies and allocates all allocatable arrays - procedure, public :: accel_user => user_getacch_body !! Add user-supplied heliocentric accelerations to planets + procedure, public :: accel_user => user_kick_getacch_body !! Add user-supplied heliocentric accelerations to planets procedure, public :: fill => util_fill_body !! "Fills" bodies from one object into another depending on the results of a mask (uses the MERGE intrinsic) procedure, public :: spill => util_spill_body !! "Spills" bodies from one object to another depending on the results of a mask (uses the PACK intrinsic) procedure, public :: reverse_status => util_reverse_status !! Reverses the active/inactive status of all particles in a structure @@ -218,10 +218,10 @@ module swiftest_classes ! 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 :: accel_int => kick_getacch_int_pl !! Compute direct cross (third) term heliocentric accelerations of massive bodies + procedure, public :: accel_int => kick_kick_getacch_int_pl !! Compute direct cross (third) term heliocentric accelerations of massive bodies procedure, public :: accel_obl => obl_acc_pl !! Compute the barycentric accelerations of bodies due to the oblateness of the central body procedure, public :: setup => setup_pl !! A base constructor that sets the number of bodies and allocates and initializes all arrays - procedure, public :: accel_tides => tides_getacch_pl !! Compute the accelerations of bodies due to tidal interactions with the central body + procedure, public :: accel_tides => tides_kick_getacch_pl !! Compute the accelerations of bodies due to tidal interactions with the central body procedure, public :: set_mu => util_set_mu_pl !! Method used to construct the vectorized form of the central body mass procedure, public :: set_rhill => util_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) @@ -247,7 +247,7 @@ module swiftest_classes ! Test particle-specific concrete methods ! These are concrete because they are the same implemenation for all integrators 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 :: accel_int => kick_getacch_int_tp !! Compute direct cross (third) term heliocentric accelerations of test particles by massive bodies + procedure, public :: accel_int => kick_kick_getacch_int_tp !! Compute direct cross (third) term heliocentric accelerations of test particles by massive bodies procedure, public :: accel_obl => obl_acc_tp !! Compute the barycentric accelerations of bodies due to the oblateness of the central body procedure, public :: setup => setup_tp !! A base constructor that sets the number of bodies and procedure, public :: set_mu => util_set_mu_tp !! Method used to construct the vectorized form of the central body mass @@ -415,12 +415,12 @@ module subroutine eucl_dist_index_plpl(self) class(swiftest_pl), intent(inout) :: self !! Swiftest massive body object end subroutine - module pure subroutine gr_getaccb_ns_body(self, system, param) + module pure subroutine gr_kick_getaccb_ns_body(self, system, param) implicit none class(swiftest_body), intent(inout) :: self !! Swiftest generic body object class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters - end subroutine gr_getaccb_ns_body + end subroutine gr_kick_getaccb_ns_body module pure subroutine gr_p4_pos_kick(param, x, v, dt) implicit none @@ -604,18 +604,18 @@ module subroutine io_write_frame_system(self, iu, param) class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters end subroutine io_write_frame_system - module pure subroutine kick_getacch_int_pl(self) + module pure subroutine kick_kick_getacch_int_pl(self) implicit none class(swiftest_pl), intent(inout) :: self - end subroutine kick_getacch_int_pl + end subroutine kick_kick_getacch_int_pl - module pure subroutine kick_getacch_int_tp(self, GMpl, xhp, npl) + module pure subroutine kick_kick_getacch_int_tp(self, GMpl, xhp, npl) implicit none class(swiftest_tp), intent(inout) :: self !! Swiftest test particle real(DP), dimension(:), intent(in) :: GMpl !! Massive body masses real(DP), dimension(:,:), intent(in) :: xhp !! Massive body position vectors integer(I4B), intent(in) :: npl !! Number of active massive bodies - end subroutine kick_getacch_int_tp + end subroutine kick_kick_getacch_int_tp module subroutine kick_vh_body(self, dt) implicit none @@ -703,11 +703,11 @@ module subroutine setup_tp(self, n) integer, intent(in) :: n !! Number of bodies to allocate space for end subroutine setup_tp - module subroutine tides_getacch_pl(self, system) + module subroutine tides_kick_getacch_pl(self, system) implicit none class(swiftest_pl), intent(inout) :: self !! Swiftest massive body object class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object - end subroutine tides_getacch_pl + end subroutine tides_kick_getacch_pl module subroutine tides_step_spin_system(self, param, t, dt) implicit none @@ -717,14 +717,14 @@ module subroutine tides_step_spin_system(self, param, t, dt) real(DP), intent(in) :: dt !! Current stepsize end subroutine tides_step_spin_system - module subroutine user_getacch_body(self, system, param, t, lbeg) + module subroutine user_kick_getacch_body(self, system, param, t, lbeg) implicit none class(swiftest_body), intent(inout) :: self !! Swiftest massive body particle data structure class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody_system_object class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters real(DP), intent(in) :: t !! Current time logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step - end subroutine user_getacch_body + end subroutine user_kick_getacch_body module subroutine util_coord_b2h_pl(self, cb) implicit none diff --git a/src/modules/symba_classes.f90 b/src/modules/symba_classes.f90 index 93e9184e2..85c65de34 100644 --- a/src/modules/symba_classes.f90 +++ b/src/modules/symba_classes.f90 @@ -91,6 +91,7 @@ module symba_classes private procedure, public :: discard => symba_discard_pl !! Process massive body discards procedure, public :: encounter_check => symba_encounter_check_pl !! Checks if massive bodies are going through close encounters with each other + procedure, public :: accel => symba_kick_getacch_pl !! Compute heliocentric accelerations of massive bodies procedure, public :: setup => symba_setup_pl !! Constructor method - Allocates space for number of particle end type symba_pl @@ -106,6 +107,7 @@ module symba_classes 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 end type symba_tp @@ -212,23 +214,23 @@ module function symba_encounter_check_tp(self, system, dt, irec) result(lany_enc logical :: lany_encounter !! Returns true if there is at least one close encounter end function symba_encounter_check_tp - module subroutine symba_getacch_pl(self, system, param, t, lbeg) + module subroutine symba_kick_getacch_pl(self, system, param, t, lbeg) implicit none class(symba_pl), intent(inout) :: self !! SyMBA massive body particle data structure class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters real(DP), intent(in) :: t !! Current simulation time logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step - end subroutine symba_getacch_pl + end subroutine symba_kick_getacch_pl - module subroutine symba_getacch_tp(self, system, param, t, lbeg) + module subroutine symba_kick_getacch_tp(self, system, param, t, lbeg) implicit none class(symba_tp), intent(inout) :: self !! SyMBA test particle data structure class(swiftest_nbody_system), intent(inout) :: system !! Swiftest nbody system object class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters real(DP), intent(in) :: t !! Current time logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step - end subroutine symba_getacch_tp + end subroutine symba_kick_getacch_tp module subroutine symba_kick_pltpenc(self, system, dt, irec, sgn) implicit none diff --git a/src/modules/whm_classes.f90 b/src/modules/whm_classes.f90 index ef2487aa6..f4f98dbf3 100644 --- a/src/modules/whm_classes.f90 +++ b/src/modules/whm_classes.f90 @@ -35,8 +35,8 @@ module whm_classes procedure, public :: vh2vj => whm_coord_vh2vj_pl !! Convert velocity vectors from heliocentric to Jacobi coordinates procedure, public :: drift => whm_drift_pl !! Loop through massive bodies and call Danby drift routine to jacobi coordinates procedure, public :: fill => whm_util_fill_pl !! "Fills" bodies from one object into another depending on the results of a mask (uses the MERGE intrinsic) - procedure, public :: accel => whm_getacch_pl !! Compute heliocentric accelerations of massive bodies - procedure, public :: accel_gr => whm_gr_getacch_pl !! Acceleration term arising from the post-Newtonian correction + procedure, public :: accel => whm_kick_getacch_pl !! Compute heliocentric accelerations of massive bodies + procedure, public :: accel_gr => whm_gr_kick_getacch_pl !! Acceleration term arising from the post-Newtonian correction procedure, public :: gr_pos_kick => whm_gr_p4_pl !! Position kick due to p**4 term in the post-Newtonian correction procedure, public :: setup => whm_setup_pl !! Constructor method - Allocates space for number of particles procedure, public :: set_mu => whm_util_set_mu_eta_pl !! Sets the Jacobi mass value for all massive bodies. @@ -55,8 +55,8 @@ module whm_classes !! component list, such as whm_setup_tp and whm_util_spill_tp contains private - procedure, public :: accel => whm_getacch_tp !! Compute heliocentric accelerations of test particles - procedure, public :: accel_gr => whm_gr_getacch_tp !! Acceleration term arising from the post-Newtonian correction + procedure, public :: accel => whm_kick_getacch_tp !! Compute heliocentric accelerations of test particles + procedure, public :: accel_gr => whm_gr_kick_getacch_tp !! Acceleration term arising from the post-Newtonian correction procedure, public :: gr_pos_kick => whm_gr_p4_tp !! Position kick due to p**4 term in the post-Newtonian correction procedure, public :: setup => whm_setup_tp !! Allocates new components of the whm class and recursively calls parent allocations procedure, public :: step => whm_step_tp !! Steps the particle forward one stepsize @@ -115,7 +115,7 @@ module subroutine whm_util_fill_pl(self, inserts, lfill_list) end subroutine whm_util_fill_pl !> Get heliocentric accelration of massive bodies - module subroutine whm_getacch_pl(self, system, param, t, lbeg) + module subroutine whm_kick_getacch_pl(self, system, param, t, lbeg) use swiftest_classes, only : swiftest_cb, swiftest_parameters implicit none class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure @@ -123,10 +123,10 @@ module subroutine whm_getacch_pl(self, system, param, t, lbeg) class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters real(DP), intent(in) :: t !! Current simulation time logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step - end subroutine whm_getacch_pl + end subroutine whm_kick_getacch_pl !> Get heliocentric accelration of the test particle - module subroutine whm_getacch_tp(self, system, param, t, lbeg) + module subroutine whm_kick_getacch_tp(self, system, param, t, lbeg) use swiftest_classes, only : swiftest_cb, swiftest_parameters implicit none class(whm_tp), intent(inout) :: self !! WHM test particle data structure @@ -134,21 +134,21 @@ module subroutine whm_getacch_tp(self, system, param, t, lbeg) class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters real(DP), intent(in) :: t !! Current time logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step - end subroutine whm_getacch_tp + end subroutine whm_kick_getacch_tp - module subroutine whm_gr_getacch_pl(self, param) + module subroutine whm_gr_kick_getacch_pl(self, param) use swiftest_classes, only : swiftest_cb, swiftest_parameters implicit none class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters - end subroutine whm_gr_getacch_pl + end subroutine whm_gr_kick_getacch_pl - module subroutine whm_gr_getacch_tp(self, param) + module subroutine whm_gr_kick_getacch_tp(self, param) use swiftest_classes, only : swiftest_cb, swiftest_parameters implicit none class(whm_tp), intent(inout) :: self !! WHM test particle data structure class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters - end subroutine whm_gr_getacch_tp + end subroutine whm_gr_kick_getacch_tp module pure subroutine whm_gr_p4_pl(self, param, dt) use swiftest_classes, only : swiftest_parameters diff --git a/src/rmvs/rmvs_getacch.f90 b/src/rmvs/rmvs_kick.f90 similarity index 91% rename from src/rmvs/rmvs_getacch.f90 rename to src/rmvs/rmvs_kick.f90 index 0ede99ab5..c68453d3d 100644 --- a/src/rmvs/rmvs_getacch.f90 +++ b/src/rmvs/rmvs_kick.f90 @@ -1,13 +1,13 @@ -submodule(rmvs_classes) s_rmvs_getacch +submodule(rmvs_classes) s_rmvs_kick use swiftest contains - module subroutine rmvs_getacch_tp(self, system, param, t, lbeg) + module subroutine rmvs_kick_getacch_tp(self, system, param, t, lbeg) !! author: David A. Minton !! !! Compute the oblateness acceleration in the inner encounter region with planets !! - !! Performs a similar task as David E. Kaufmann's Swifter routine rmvs_getacch_tp.f90, but + !! Performs a similar task as David E. Kaufmann's Swifter routine rmvs_kick_getacch_tp.f90, but !! uses object polymorphism, and so is not directly adapted. implicit none ! Arguments @@ -49,7 +49,7 @@ module subroutine rmvs_getacch_tp(self, system, param, t, lbeg) param_planetocen%lextra_force = .false. param_planetocen%lgr = .false. ! Now compute the planetocentric values of acceleration - call whm_getacch_tp(tp, system_planetocen, param_planetocen, t) + call whm_kick_getacch_tp(tp, system_planetocen, param_planetocen, t) ! Now compute any heliocentric values of acceleration if (tp%lfirst) then @@ -74,7 +74,7 @@ module subroutine rmvs_getacch_tp(self, system, param, t, lbeg) end select end select else ! Not a close encounter, so just proceded with the standard WHM method - call whm_getacch_tp(tp, system, param, t, lbeg) + call whm_kick_getacch_tp(tp, system, param, t, lbeg) end if end select @@ -82,6 +82,6 @@ module subroutine rmvs_getacch_tp(self, system, param, t, lbeg) return - end subroutine rmvs_getacch_tp + end subroutine rmvs_kick_getacch_tp -end submodule s_rmvs_getacch \ No newline at end of file +end submodule s_rmvs_kick \ No newline at end of file diff --git a/src/symba/symba_getacch.f90 b/src/symba/symba_getacch.f90 index b2410d99a..d10e2267c 100644 --- a/src/symba/symba_getacch.f90 +++ b/src/symba/symba_getacch.f90 @@ -1,13 +1,13 @@ -submodule (symba_classes) s_symba_getacch +submodule (symba_classes) s_symba_kick_getacch use swiftest contains - module subroutine symba_getacch_pl(self, system, param, t, lbeg) + module subroutine symba_kick_getacch_pl(self, system, param, t, lbeg) !! author: David A. Minton !! !! Compute heliocentric accelerations of massive bodies !! - !! Adapted from David E. Kaufmann's Swifter routine symba_getacch.f90 - !! Adapted from Hal Levison's Swift routine symba5_getacch.f + !! Adapted from David E. Kaufmann's Swifter routine symba_kick_getacch.f90 + !! Adapted from Hal Levison's Swift routine symba5_kick_getacch.f implicit none ! Arguments class(symba_pl), intent(inout) :: self !! SyMBA massive body particle data structure @@ -17,13 +17,12 @@ module subroutine symba_getacch_pl(self, system, param, t, lbeg) logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the step ! Internals integer(I4B) :: k - real(DP) :: rji2, rlim2, faci, facj + real(DP) :: irij3, rji2, rlim2, faci, facj real(DP), dimension(NDIM) :: dx select type(system) class is (symba_nbody_system) associate(pl => self, cb => system%cb, plplenc_list => system%plplenc_list, nplplenc => system%plplenc_list%nenc) - call helio_getacch_pl(pl, system, param, t, lbeg) ! Remove accelerations from encountering pairs do k = 1, nplplenc associate(i => plplenc_list%index1(k), j => plplenc_list%index2(k)) @@ -39,19 +38,20 @@ module subroutine symba_getacch_pl(self, system, param, t, lbeg) end if end associate end do + call helio_kick_getacch_pl(pl, system, param, t, lbeg) end associate end select return - end subroutine symba_getacch_pl + end subroutine symba_kick_getacch_pl - module subroutine symba_getacch_tp(self, system, param, t, lbeg) + module subroutine symba_kick_getacch_tp(self, system, param, t, lbeg) !! author: David A. Minton !! !! Compute heliocentric accelerations of test particles !! - !! Adapted from David E. Kaufmann's Swifter routine symba_getacch_tp.f90 - !! Adapted from Hal Levison's Swift routine symba5_getacch.f + !! Adapted from David E. Kaufmann's Swifter routine symba_kick_getacch_tp.f90 + !! Adapted from Hal Levison's Swift routine symba5_kick_getacch.f implicit none ! Arguments class(symba_tp), intent(inout) :: self !! SyMBA test particle data structure @@ -67,7 +67,6 @@ module subroutine symba_getacch_tp(self, system, param, t, lbeg) select type(system) class is (symba_nbody_system) associate(tp => self, cb => system%cb, pl => system%pl, pltpenc_list => system%pltpenc_list, npltpenc => system%pltpenc_list%nenc) - call helio_getacch_tp(tp, system, param, t, lbeg) ! Remove accelerations from encountering pairs do k = 1, npltpenc associate(i => pltpenc_list%index1(k), j => pltpenc_list%index2(k)) @@ -81,10 +80,11 @@ module subroutine symba_getacch_tp(self, system, param, t, lbeg) end if end IF end associate - end DO + end do + call helio_kick_getacch_tp(tp, system, param, t, lbeg) end associate end select return - end subroutine symba_getacch_tp + end subroutine symba_kick_getacch_tp -end submodule s_symba_getacch +end submodule s_symba_kick_getacch diff --git a/src/tides/tides_getacch_pl.f90 b/src/tides/tides_getacch_pl.f90 index ff9d554ef..ae503e082 100644 --- a/src/tides/tides_getacch_pl.f90 +++ b/src/tides/tides_getacch_pl.f90 @@ -1,7 +1,7 @@ -submodule(swiftest_classes) s_tides_getacch +submodule(swiftest_classes) s_tides_kick_getacch use swiftest contains - module subroutine tides_getacch_pl(self, system) + module subroutine tides_kick_getacch_pl(self, system) !! author: Jennifer L.L. Pouplin, Carlisle A. wishard, and David A. Minton !! !! Calculated tidal torques from central body to any planet and from any planet to central body @@ -60,5 +60,5 @@ module subroutine tides_getacch_pl(self, system) return - end subroutine tides_getacch_pl -end submodule s_tides_getacch \ No newline at end of file + end subroutine tides_kick_getacch_pl +end submodule s_tides_kick_getacch \ No newline at end of file diff --git a/src/user/user_getacch.f90 b/src/user/user_getacch.f90 index 16a2f0916..ccad7ea7d 100644 --- a/src/user/user_getacch.f90 +++ b/src/user/user_getacch.f90 @@ -1,12 +1,12 @@ -submodule(swiftest_classes) s_user_getacch +submodule(swiftest_classes) s_user_kick_getacch use swiftest contains - module subroutine user_getacch_body(self, system, param, t, lbeg) + module subroutine user_kick_getacch_body(self, system, param, t, lbeg) !! author: David A. Minton !! !! Add user-supplied heliocentric accelerations to planets. !! - !! Adapted from David E. Kaufmann's Swifter routine whm_user_getacch.f90 + !! Adapted from David E. Kaufmann's Swifter routine whm_user_kick_getacch.f90 implicit none ! Arguments class(swiftest_body), intent(inout) :: self !! Swiftest massive body particle data structure @@ -16,6 +16,6 @@ module subroutine user_getacch_body(self, system, param, t, lbeg) logical, optional, intent(in) :: lbeg !! Optional argument that determines whether or not this is the beginning or end of the ste return - end subroutine user_getacch_body + end subroutine user_kick_getacch_body -end submodule s_user_getacch +end submodule s_user_kick_getacch diff --git a/src/whm/whm_gr.f90 b/src/whm/whm_gr.f90 index 62c7fb2b5..c6d0b1723 100644 --- a/src/whm/whm_gr.f90 +++ b/src/whm/whm_gr.f90 @@ -1,12 +1,12 @@ submodule(whm_classes) s_whm_gr use swiftest contains - module subroutine whm_gr_getacch_pl(self, param) !! author: David A. Minton + module subroutine whm_gr_kick_getacch_pl(self, param) !! author: David A. Minton !! !! Compute relativisitic accelerations of massive bodies !! Based on Saha & Tremaine (1994) Eq. 28 !! - !! Adapted from David A. Minton's Swifter routine routine gr_whm_getacch.f90 + !! Adapted from David A. Minton's Swifter routine routine gr_whm_kick_getacch.f90 implicit none ! Arguments class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure @@ -33,15 +33,15 @@ module subroutine whm_gr_getacch_pl(self, param) !! author: David A. Minton end do end associate return - end subroutine whm_gr_getacch_pl + end subroutine whm_gr_kick_getacch_pl - module subroutine whm_gr_getacch_tp(self, param) + module subroutine whm_gr_kick_getacch_tp(self, param) !! author: David A. Minton !! !! Compute relativisitic accelerations of test particles !! Based on Saha & Tremaine (1994) Eq. 28 !! - !! Adapted from David A. Minton's Swifter routine routine gr_whm_getacch.f90 + !! Adapted from David A. Minton's Swifter routine routine gr_whm_kick_getacch.f90 implicit none ! Arguments class(whm_tp), intent(inout) :: self !! WHM massive body particle data structure @@ -59,7 +59,7 @@ module subroutine whm_gr_getacch_tp(self, param) end do end associate return - end subroutine whm_gr_getacch_tp + end subroutine whm_gr_kick_getacch_tp module pure subroutine whm_gr_p4_pl(self, param, dt) !! author: David A. Minton diff --git a/src/whm/whm_getacch.f90 b/src/whm/whm_kick.f90 similarity index 82% rename from src/whm/whm_getacch.f90 rename to src/whm/whm_kick.f90 index e950d855c..af8805d47 100644 --- a/src/whm/whm_getacch.f90 +++ b/src/whm/whm_kick.f90 @@ -1,13 +1,13 @@ -submodule(whm_classes) s_whm_getacch +submodule(whm_classes) s_whm_kick use swiftest contains - module subroutine whm_getacch_pl(self, system, param, t, lbeg) + module subroutine whm_kick_getacch_pl(self, system, param, t, lbeg) !! author: David A. Minton !! !! Compute heliocentric accelerations of planets !! !! Adapted from Hal Levison's Swift routine getacch.f - !! Adapted from David E. Kaufmann's Swifter routine whm_getacch.f90 + !! Adapted from David E. Kaufmann's Swifter routine whm_kick_getacch.f90 implicit none ! Arguments class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure @@ -23,13 +23,13 @@ module subroutine whm_getacch_pl(self, system, param, t, lbeg) if (npl == 0) return call pl%set_ir3() - ah0 = whm_getacch_ah0(pl%Gmass(2:npl), pl%xh(:,2:npl), npl-1) + ah0 = whm_kick_getacch_ah0(pl%Gmass(2:npl), pl%xh(:,2:npl), npl-1) do i = 1, npl pl%ah(:, i) = ah0(:) end do - call whm_getacch_ah1(cb, pl) - call whm_getacch_ah2(cb, pl) + call whm_kick_getacch_ah1(cb, pl) + call whm_kick_getacch_ah2(cb, pl) call pl%accel_int() if (param%loblatecb) then @@ -48,15 +48,15 @@ module subroutine whm_getacch_pl(self, system, param, t, lbeg) if (param%lextra_force) call pl%accel_user(system, param, t) end associate return - end subroutine whm_getacch_pl + end subroutine whm_kick_getacch_pl - module subroutine whm_getacch_tp(self, system, param, t, lbeg) + module subroutine whm_kick_getacch_tp(self, system, param, t, lbeg) !! author: David A. Minton !! !! Compute heliocentric accelerations of test particles !! !! Adapted from Hal Levison's Swift routine getacch_tp.f - !! Adapted from David E. Kaufmann's Swifter routine whm_getacch_tp.f90 + !! Adapted from David E. Kaufmann's Swifter routine whm_kick_getacch_tp.f90 implicit none ! Arguments class(whm_tp), intent(inout) :: self !! WHM test particle data structure @@ -73,13 +73,13 @@ module subroutine whm_getacch_tp(self, system, param, t, lbeg) if (present(lbeg)) system%lbeg = lbeg if (system%lbeg) then - ah0(:) = whm_getacch_ah0(pl%Gmass(:), pl%xbeg(:,:), npl) + ah0(:) = whm_kick_getacch_ah0(pl%Gmass(:), pl%xbeg(:,:), npl) do i = 1, ntp tp%ah(:, i) = ah0(:) end do call tp%accel_int(pl%Gmass(:), pl%xbeg(:,:), npl) else - ah0(:) = whm_getacch_ah0(pl%Gmass(:), pl%xend(:,:), npl) + ah0(:) = whm_kick_getacch_ah0(pl%Gmass(:), pl%xend(:,:), npl) do i = 1, ntp tp%ah(:, i) = ah0(:) end do @@ -91,9 +91,9 @@ module subroutine whm_getacch_tp(self, system, param, t, lbeg) if (param%lgr) call tp%accel_gr(param) end associate return - end subroutine whm_getacch_tp + end subroutine whm_kick_getacch_tp - function whm_getacch_ah0(mu, xhp, n) result(ah0) + function whm_kick_getacch_ah0(mu, xhp, n) result(ah0) !! author: David A. Minton !! !! Compute zeroth term heliocentric accelerations of planets @@ -118,15 +118,15 @@ function whm_getacch_ah0(mu, xhp, n) result(ah0) end do return - end function whm_getacch_ah0 + end function whm_kick_getacch_ah0 - pure subroutine whm_getacch_ah1(cb, pl) + pure subroutine whm_kick_getacch_ah1(cb, pl) !! author: David A. Minton !! !! Compute first term heliocentric accelerations of planets !! !! Adapted from Hal Levison's Swift routine getacch_ah1.f - !! Adapted from David E. Kaufmann's Swifter routine whm_getacch_ah1.f90 + !! Adapted from David E. Kaufmann's Swifter routine whm_kick_getacch_ah1.f90 implicit none ! Arguments class(swiftest_cb), intent(in) :: cb !! WHM central body object @@ -145,15 +145,15 @@ pure subroutine whm_getacch_ah1(cb, pl) return - end subroutine whm_getacch_ah1 + end subroutine whm_kick_getacch_ah1 - pure subroutine whm_getacch_ah2(cb, pl) + pure subroutine whm_kick_getacch_ah2(cb, pl) !! author: David A. Minton !! !! Compute second term heliocentric accelerations of planets !! !! Adapted from Hal Levison's Swift routine getacch_ah2.f - !! Adapted from David E. Kaufmann's Swifter routine whm_getacch_ah2.f90 + !! Adapted from David E. Kaufmann's Swifter routine whm_kick_getacch_ah2.f90 implicit none ! Arguments class(swiftest_cb), intent(in) :: cb !! Swiftest central body object @@ -177,6 +177,6 @@ pure subroutine whm_getacch_ah2(cb, pl) end associate return - end subroutine whm_getacch_ah2 + end subroutine whm_kick_getacch_ah2 -end submodule s_whm_getacch +end submodule s_whm_kick