From c5874591d8b2fcb75e45e04b4f1c157858c020b1 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Fri, 2 Jul 2021 16:16:02 -0400 Subject: [PATCH] Rewrote comments describing input parameters. Started process of adding system to the step method for bodies to make it more generalizable across all integrators. I'm doing this so that the system object always gets passed down, rather than pulling out individual components for each method --- Makefile.Defines | 4 +- src/discard/discard.f90 | 6 +-- src/helio/helio_drift.f90 | 4 +- src/helio/helio_getacch.f90 | 4 +- src/helio/helio_step.f90 | 7 ++-- src/io/io.f90 | 30 ++++++------- src/main/swiftest_driver.f90 | 2 +- src/modules/helio_classes.f90 | 14 +++---- src/modules/rmvs_classes.f90 | 6 +-- src/modules/swiftest_classes.f90 | 72 ++++++++++++++++++-------------- src/modules/symba.f90 | 4 +- src/modules/whm_classes.f90 | 32 +++++++------- src/rmvs/rmvs_getacch.f90 | 2 +- src/rmvs/rmvs_setup.f90 | 2 +- src/rmvs/rmvs_step.f90 | 10 ++--- src/setup/setup.f90 | 2 +- src/user/user_getacch.f90 | 2 +- src/whm/whm_drift.f90 | 4 +- src/whm/whm_getacch.f90 | 4 +- src/whm/whm_gr.f90 | 20 ++++----- src/whm/whm_setup.f90 | 2 +- src/whm/whm_step.f90 | 7 ++-- 22 files changed, 125 insertions(+), 115 deletions(-) diff --git a/Makefile.Defines b/Makefile.Defines index 820ad6d7d..07126f842 100644 --- a/Makefile.Defines +++ b/Makefile.Defines @@ -65,8 +65,8 @@ GPAR = -fopenmp -ftree-parallelize-loops=4 GMEM = -fsanitize=undefined -fsanitize=address -fsanitize=leak GWARNINGS = -Wall -Warray-bounds -Wimplicit-interface -Wextra -Warray-temporaries -#FFLAGS = $(IDEBUG) $(HEAPARR) -FFLAGS = -init=snan,arrays -no-wrap-margin -O3 $(STRICTREAL) $(SIMDVEC) $(PAR) +FFLAGS = $(IDEBUG) $(HEAPARR) +#FFLAGS = -init=snan,arrays -no-wrap-margin -O3 $(STRICTREAL) $(SIMDVEC) $(PAR) FORTRAN = ifort #AR = xiar diff --git a/src/discard/discard.f90 b/src/discard/discard.f90 index 513a59122..754cb468c 100644 --- a/src/discard/discard.f90 +++ b/src/discard/discard.f90 @@ -10,7 +10,7 @@ module subroutine discard_system(self, param) !! Adapted from Hal Levison's Swift routine discard.f implicit none class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters if (self%tp%nbody == 0) return select type(self) @@ -51,7 +51,7 @@ module subroutine discard_sun_tp(self, cb, param, t, msys) ! Arguments class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object class(swiftest_cb), intent(inout) :: cb !! Swiftest central body object - class(swiftest_parameters), intent(in) :: param !! parameters parameters + class(swiftest_parameters), intent(in) :: param !! parameters real(DP), intent(in) :: t !! Current simulation tim real(DP), intent(in) :: msys !! Total system mass ! Internals @@ -102,7 +102,7 @@ module subroutine discard_peri_tp(self, cb, pl, param, t, msys) class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object class(swiftest_cb), intent(inout) :: cb !! Swiftest central body object class(swiftest_pl), intent(inout) :: pl !! Swiftest massive body object - class(swiftest_parameters), intent(in) :: param !! parameters parameters + class(swiftest_parameters), intent(in) :: param !! parameters real(DP), intent(in) :: t !! Current simulation tim real(DP), intent(in) :: msys !! Total system mass ! Internals diff --git a/src/helio/helio_drift.f90 b/src/helio/helio_drift.f90 index ff0adc03a..1244533a0 100644 --- a/src/helio/helio_drift.f90 +++ b/src/helio/helio_drift.f90 @@ -13,7 +13,7 @@ module subroutine helio_drift_pl(self, cb, param, dt) ! Arguments class(helio_pl), intent(inout) :: self !! Helio test particle data structure class(swiftest_cb), intent(inout) :: cb !! Helio central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: dt !! Stepsize ! Internals integer(I4B) :: i !! Loop counter @@ -105,7 +105,7 @@ module subroutine helio_drift_tp(self, cb, param, dt) ! Arguments class(helio_tp), intent(inout) :: self !! Helio test particle data structure class(swiftest_cb), intent(inout) :: cb !! Helio central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: dt !! Stepsize ! Internals integer(I4B) :: i !! Loop counter diff --git a/src/helio/helio_getacch.f90 b/src/helio/helio_getacch.f90 index 14fd76b4a..3dbcc4e45 100644 --- a/src/helio/helio_getacch.f90 +++ b/src/helio/helio_getacch.f90 @@ -12,7 +12,7 @@ module subroutine helio_getacch_pl(self, cb, param, t) ! Arguments class(helio_pl), intent(inout) :: self !! Helio massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time ! Internals logical, save :: lmalloc = .true. @@ -48,7 +48,7 @@ module subroutine helio_getacch_tp(self, cb, pl, param, t, xh) class(helio_tp), intent(inout) :: self !! Helio test particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree class(whm_pl), intent(inout) :: pl !! WHM massive body particle data structure. - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), dimension(:,:), intent(in) :: xh !! Heliocentric positions of planets ! Internals diff --git a/src/helio/helio_step.f90 b/src/helio/helio_step.f90 index df92c58c1..ca6df15fa 100644 --- a/src/helio/helio_step.f90 +++ b/src/helio/helio_step.f90 @@ -11,7 +11,7 @@ module subroutine helio_step_system(self, param) implicit none ! Arguments class(helio_nbody_system), intent(inout) :: self !! Helio nbody system object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters select type(cb => self%cb) class is (helio_cb) @@ -45,7 +45,7 @@ module subroutine helio_step_pl(self, cb, param, t, dt) ! Arguments class(helio_pl), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Helio central body particle data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), intent(in) :: dt !! Stepsize ! Internals @@ -63,6 +63,7 @@ module subroutine helio_step_pl(self, cb, param, t, dt) call self%lindrift(cb, dth, ptbeg) call self%getacch(cb, param, t) call self%kickvb(dth) + call self%drift(cb, param, dt) call self%getacch(cb, param, t + dt) call self%kickvb(dth) @@ -85,7 +86,7 @@ module subroutine helio_step_tp(self, cb, pl, param, t, dt) class(helio_tp), intent(inout) :: self !! Helio test particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure class(whm_pl), intent(inout) :: pl !! WHM massive body data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), intent(in) :: dt !! Stepsize ! Internals diff --git a/src/io/io.f90 b/src/io/io.f90 index 0b75066af..6f40423c9 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -13,7 +13,7 @@ module subroutine io_param_reader(self, unit, iotype, v_list, iostat, iomsg) !! Adapted from Martin Duncan's Swift routine io_init_param.f implicit none ! Arguments - class(swiftest_parameters), intent(inout) :: self !! Collection of parameters parameters + class(swiftest_parameters), intent(inout) :: self !! Collection of parameters integer, intent(in) :: unit !! File unit number character(len=*), intent(in) :: iotype !! Dummy argument passed to the input/output procedure contains the text from the char-literal-constant, prefixed with DT. !! If you do not include a char-literal-constant, the iotype argument contains only DT. @@ -316,7 +316,7 @@ module subroutine io_param_writer(self, unit, iotype, v_list, iostat, iomsg) !! Adapted from Martin Duncan's Swift routine io_dump_param.f implicit none ! Arguments - class(swiftest_parameters),intent(in) :: self !! Collection of parameters parameters + class(swiftest_parameters),intent(in) :: self !! Collection of parameters integer, intent(in) :: unit !! File unit number character(len=*), intent(in) :: iotype !! Dummy argument passed to the input/output procedure contains the text from the char-literal-constant, prefixed with DT. !! If you do not include a char-literal-constant, the iotype argument contains only DT. @@ -405,7 +405,7 @@ module subroutine io_dump_param(self, param_file_name, t, dt) !! Adapted from Martin Duncan's Swift routine io_dump_param.f implicit none ! Arguments - class(swiftest_parameters),intent(in) :: self !! Output collection of parameters + class(swiftest_parameters),intent(in) :: self !! Output collection of parameters character(len=*), intent(in) :: param_file_name !! Parameter input file name (i.e. param.in) real(DP),intent(in) :: t !! Current simulation time real(DP),intent(in) :: dt !! Step size @@ -444,7 +444,7 @@ module subroutine io_dump_swiftest(self, param, t, dt, msg) implicit none ! Arguments class(swiftest_base), intent(inout) :: self !! Swiftest base object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Stepsize character(*), optional, intent(in) :: msg !! Message to display with dump operation @@ -483,7 +483,7 @@ module subroutine io_dump_system(self, param, t, dt, msg) implicit none ! Arguments class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Stepsize character(*), optional, intent(in) :: msg !! Message to display with dump operation @@ -636,7 +636,7 @@ module subroutine io_read_body_in(self, param) implicit none ! Arguments class(swiftest_body), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters ! Internals integer(I4B), parameter :: LUN = 7 !! Unit number of input file integer(I4B) :: iu = LUN @@ -776,7 +776,7 @@ module subroutine io_read_param_in(self, param_file_name) !! Adapted from Martin Duncan's Swift routine io_init_param.f implicit none ! Arguments - class(swiftest_parameters),intent(out) :: self !! Input collection of parameters parameters + class(swiftest_parameters),intent(out) :: self !! Current run configuration parameters of parameters character(len=*), intent(in) :: param_file_name !! Parameter input file name (i.e. param.in) ! Internals integer(I4B), parameter :: LUN = 7 !! Unit number of input file @@ -870,7 +870,7 @@ module subroutine io_read_frame_body(self, iu, param, form, t, ierr) ! Arguments class(swiftest_body), intent(inout) :: self !! Swiftest particle object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters character(*), intent(in) :: form !! Input format code ("XV" or "EL") real(DP), intent(out) :: t !! Simulation time integer(I4B), intent(out) :: ierr !! Error code @@ -932,7 +932,7 @@ module subroutine io_read_frame_cb(self, iu, param, form, t, ierr) ! Arguments class(swiftest_cb), intent(inout) :: self !! Swiftest central body object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters character(*), intent(in) :: form !! Input format code ("XV" or "EL") real(DP), intent(out) :: t !! Simulation time integer(I4B), intent(out) :: ierr !! Error cod @@ -966,7 +966,7 @@ module subroutine io_read_frame_system(self, iu, param, form, t, ierr) ! Arguments class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters character(*), intent(in) :: form !! Input format code ("XV" or "EL") real(DP), intent(out) :: t !! Current simulation time integer(I4B), intent(out) :: ierr !! Error code @@ -1042,7 +1042,7 @@ module subroutine io_read_initialize_system(self, param) implicit none ! Arguments class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters call self%cb%initialize(param) call self%pl%initialize(param) @@ -1063,7 +1063,7 @@ module subroutine io_write_discard(self, param, discards) implicit none ! Arguments class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters class(swiftest_body), intent(inout) :: discards !! Swiftest discard object ! Internals integer(I4B), parameter :: LUN = 40 @@ -1196,7 +1196,7 @@ module subroutine io_write_frame_body(self, iu, param, t, dt) ! Arguments class(swiftest_body), intent(in) :: self !! Swiftest particle object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Step size @@ -1252,7 +1252,7 @@ module subroutine io_write_frame_cb(self, iu, param, t, dt) ! Arguments class(swiftest_cb), intent(in) :: self !! Swiftest central body object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Step size @@ -1288,7 +1288,7 @@ module subroutine io_write_frame_system(self, iu, param, t, dt) ! Arguments class(swiftest_nbody_system), intent(in) :: self !! Swiftest system object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Step size ! Internals diff --git a/src/main/swiftest_driver.f90 b/src/main/swiftest_driver.f90 index 166dbe409..e88118d12 100644 --- a/src/main/swiftest_driver.f90 +++ b/src/main/swiftest_driver.f90 @@ -12,7 +12,7 @@ program swiftest_driver class(swiftest_nbody_system), allocatable :: nbody_system !! Polymorphic object containing the nbody system to be integrated type(swiftest_parameters) :: param integer(I4B) :: integrator !! Integrator type code (see swiftest_globals for symbolic names) - character(len=:),allocatable :: param_file_name !! Name of the file containing user-defined parameters parameters + character(len=:),allocatable :: param_file_name !! Name of the file containing user-defined parameters integer(I4B) :: ierr !! I/O error code logical :: lfirst !! Flag indicating that this is the first time through the main loop integer(I8B) :: iloop !! Loop counter diff --git a/src/modules/helio_classes.f90 b/src/modules/helio_classes.f90 index d7b2d2d8d..3d12882b2 100644 --- a/src/modules/helio_classes.f90 +++ b/src/modules/helio_classes.f90 @@ -97,7 +97,7 @@ module subroutine helio_drift_pl(self, cb, param, dt) implicit none class(helio_pl), intent(inout) :: self !! Helio massive body object class(swiftest_cb), intent(inout) :: cb !! Helio central body object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: dt !! Stepsize end subroutine helio_drift_pl @@ -106,7 +106,7 @@ module subroutine helio_drift_tp(self, cb, param, dt) implicit none class(helio_tp), intent(inout) :: self !! Helio test particle object class(swiftest_cb), intent(inout) :: cb !! Helio central body object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: dt !! Stepsize end subroutine helio_drift_tp @@ -131,7 +131,7 @@ module subroutine helio_getacch_pl(self, cb, param, t) implicit none class(helio_pl), intent(inout) :: self !! Helio massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current time end subroutine helio_getacch_pl @@ -142,7 +142,7 @@ module subroutine helio_getacch_tp(self, cb, pl, param, t, xh) class(helio_tp), intent(inout) :: self !! Helio test particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree class(whm_pl), intent(inout) :: pl !! Swiftest massive body particle data structure. - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current time real(DP), dimension(:,:), intent(in) :: xh !! Heliocentric positions of planets end subroutine helio_getacch_tp @@ -178,7 +178,7 @@ module subroutine helio_step_system(self, param) use swiftest_classes, only : swiftest_parameters implicit none class(helio_nbody_system), intent(inout) :: self !! Helio nbody system object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters end subroutine helio_step_system module subroutine helio_step_pl(self, cb, param, t, dt) @@ -186,7 +186,7 @@ module subroutine helio_step_pl(self, cb, param, t, dt) implicit none class(helio_pl), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), intent(in) :: dt !! Stepsize end subroutine helio_step_pl @@ -198,7 +198,7 @@ module subroutine helio_step_tp(self, cb, pl, param, t, dt) class(helio_tp), intent(inout) :: self !! Helio test particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure class(whm_pl), intent(inout) :: pl !! WHM massive body data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), intent(in) :: dt !! Stepsize end subroutine helio_step_tp diff --git a/src/modules/rmvs_classes.f90 b/src/modules/rmvs_classes.f90 index 881185af1..4dea2e59f 100644 --- a/src/modules/rmvs_classes.f90 +++ b/src/modules/rmvs_classes.f90 @@ -124,7 +124,7 @@ module subroutine rmvs_getacch_tp(self, cb, pl, param, t, xh) class(rmvs_tp), intent(inout) :: self !! RMVS test particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree class(whm_pl), intent(inout) :: pl !! WHM massive body particle data structure. - class(swiftest_parameters), intent(in) :: param !! Input collection of parameter + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameter real(DP), intent(in) :: t !! Current time real(DP), dimension(:,:), intent(in) :: xh !! Heliocentric positions of planets end subroutine rmvs_getacch_tp @@ -133,7 +133,7 @@ module subroutine rmvs_setup_system(self, param) use swiftest_classes, only : swiftest_parameters implicit none class(rmvs_nbody_system), intent(inout) :: self !! RMVS system object - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters end subroutine rmvs_setup_system module subroutine rmvs_setup_pl(self,n) @@ -152,7 +152,7 @@ module subroutine rmvs_step_system(self, param) use swiftest_classes, only : swiftest_parameters implicit none class(rmvs_nbody_system), intent(inout) :: self !! RMVS nbody system object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters end subroutine rmvs_step_system module subroutine rmvs_setup_tp(self,n) diff --git a/src/modules/swiftest_classes.f90 b/src/modules/swiftest_classes.f90 index 7be1b04b3..5dd39f74d 100644 --- a/src/modules/swiftest_classes.f90 +++ b/src/modules/swiftest_classes.f90 @@ -11,7 +11,7 @@ module swiftest_classes ! swiftest_parameters class definitions !******************************************************************************************************************************** - !> User defined parameters parameters that are read in from the parameters input file. + !> User defined parameters that are read in from the parameters input file. !> Each paramter is initialized to a default values. type, public :: swiftest_parameters integer(I4B) :: integrator = UNKNOWN_INTEGRATOR !! Symbolic name of the nbody integrator used @@ -141,8 +141,9 @@ module swiftest_classes !! component list, such as setup_body and util_spill contains private - procedure(abstract_set_mu), public, deferred :: set_mu + procedure(abstract_set_mu), public, deferred :: set_mu procedure(abstract_gr_getacch), public, deferred :: gr_getacch + procedure(abstract_step_body), public, deferred :: step ! These are concrete because the implementation is the same for all types of particles procedure, public :: gr_getaccb => gr_getaccb_ns_body !! Add relativistic correction acceleration for non-symplectic integrators procedure, public :: initialize => io_read_body_in !! Read in body initial conditions from a file @@ -160,6 +161,7 @@ module swiftest_classes 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 + procedure, public :: step end type swiftest_body !******************************************************************************************************************************** @@ -272,20 +274,20 @@ subroutine abstract_gr_getacch(self, cb, param) import swiftest_body, swiftest_cb, swiftest_parameters class(swiftest_body), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of parameter + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameter end subroutine abstract_gr_getacch subroutine abstract_initialize(self, param) import swiftest_base, swiftest_parameters class(swiftest_base), intent(inout) :: self !! Swiftest base object - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters end subroutine abstract_initialize subroutine abstract_read_frame(self, iu, param, form, t, ierr) import DP, I4B, swiftest_base, swiftest_parameters class(swiftest_base), intent(inout) :: self !! Swiftest base object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters character(*), intent(in) :: form !! Input format code ("XV" or "EL") real(DP), intent(out) :: t !! Simulation time integer(I4B), intent(out) :: ierr !! Error code @@ -294,21 +296,29 @@ end subroutine abstract_read_frame subroutine abstract_set_mu(self, cb) import swiftest_body, swiftest_cb class(swiftest_body), intent(inout) :: self !! Swiftest particle object - class(swiftest_cb), intent(inout) :: cb !! Swiftest central body objectt + class(swiftest_cb), intent(inout) :: cb !! Swiftest central body object end subroutine abstract_set_mu + subroutine abstract_step_body(self, system, param, dt) + import swiftest_nbody_system, swiftest_parameters + implicit none + class(swiftest_body), intent(inout) :: self !! Swiftest particle object + class(swiftest_nbody_system), intent(inout) :: system !! Swiftest system object + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters + end subroutine abstract_step_body + subroutine abstract_step_system(self, param) import swiftest_nbody_system, swiftest_parameters implicit none - class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters end subroutine abstract_step_system subroutine abstract_write_frame(self, iu, param, t, dt) 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_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Step size end subroutine abstract_write_frame @@ -320,7 +330,7 @@ module subroutine discard_peri_tp(self, cb, pl, param, t, msys) class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object class(swiftest_cb), intent(inout) :: cb !! Swiftest central body object class(swiftest_pl), intent(inout) :: pl !! Swiftest massive body object - class(swiftest_parameters), intent(in) :: param !! parameters parameters + class(swiftest_parameters), intent(in) :: param !! parameters real(DP), intent(in) :: t !! Current simulation tim real(DP), intent(in) :: msys !! Total system mass end subroutine discard_peri_tp @@ -345,7 +355,7 @@ module subroutine discard_sun_tp(self, cb, param, t, msys) implicit none class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object class(swiftest_cb), intent(inout) :: cb !! Swiftest central body object - class(swiftest_parameters), intent(in) :: param !! parameters parameters + class(swiftest_parameters), intent(in) :: param !! parameters real(DP), intent(in) :: t !! Current simulation tim real(DP), intent(in) :: msys !! Total system mass end subroutine discard_sun_tp @@ -353,7 +363,7 @@ 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 !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters end subroutine discard_system module pure elemental subroutine drift_one(mu, px, py, pz, vx, vy, vz, dt, iflag) @@ -402,7 +412,7 @@ module subroutine kick_vh_body(self, dt) end subroutine kick_vh_body module subroutine io_param_reader(self, unit, iotype, v_list, iostat, iomsg) - class(swiftest_parameters), intent(inout) :: self !! Collection of parameters parameters + class(swiftest_parameters), intent(inout) :: self !! Collection of parameters integer, intent(in) :: unit !! File unit number character(len=*), intent(in) :: iotype !! Dummy argument passed to the input/output procedure contains the text from the char-literal-constant, prefixed with DT. !! If you do not include a char-literal-constant, the iotype argument contains only DT. @@ -412,7 +422,7 @@ module subroutine io_param_reader(self, unit, iotype, v_list, iostat, iomsg) end subroutine io_param_reader module subroutine io_param_writer(self, unit, iotype, v_list, iostat, iomsg) - class(swiftest_parameters),intent(in) :: self !! Collection of parameters parameters + class(swiftest_parameters),intent(in) :: self !! Collection of parameters integer, intent(in) :: unit !! File unit number character(len=*), intent(in) :: iotype !! Dummy argument passed to the input/output procedure contains the text from the char-literal-constant, prefixed with DT. !! If you do not include a char-literal-constant, the iotype argument contains only DT. @@ -422,7 +432,7 @@ module subroutine io_param_writer(self, unit, iotype, v_list, iostat, iomsg) end subroutine io_param_writer module subroutine io_dump_param(self, param_file_name, t, dt) - class(swiftest_parameters),intent(in) :: self !! Output collection of parameters + class(swiftest_parameters),intent(in) :: self !! Output collection of parameters character(len=*), intent(in) :: param_file_name !! Parameter input file name (i.e. param.in) real(DP),intent(in) :: t !! Current simulation time real(DP),intent(in) :: dt !! Step size @@ -431,7 +441,7 @@ end subroutine io_dump_param module subroutine io_dump_swiftest(self, param, t, dt, msg) implicit none class(swiftest_base), intent(inout) :: self !! Swiftest base object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Stepsize character(*), optional, intent(in) :: msg !! Message to display with dump operation @@ -440,7 +450,7 @@ end subroutine io_dump_swiftest module subroutine io_dump_system(self, param, t, dt, msg) implicit none class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Stepsize character(*), optional, intent(in) :: msg !! Message to display with dump operation @@ -464,7 +474,7 @@ end function io_get_token module subroutine io_read_body_in(self, param) implicit none class(swiftest_body), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters end subroutine io_read_body_in module subroutine io_read_cb_in(self, param) @@ -474,7 +484,7 @@ module subroutine io_read_cb_in(self, param) end subroutine io_read_cb_in module subroutine io_read_param_in(self, param_file_name) - class(swiftest_parameters),intent(out) :: self !! Input collection of parameters parameters + class(swiftest_parameters),intent(out) :: self !! Current run configuration parameters of parameters character(len=*), intent(in) :: param_file_name !! Parameter input file name (i.e. param.in) end subroutine io_read_param_in @@ -492,7 +502,7 @@ module subroutine io_read_frame_body(self, iu, param, form, t, ierr) implicit none class(swiftest_body), intent(inout) :: self !! Swiftest particle object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters character(*), intent(in) :: form !! Input format code ("XV" or "EL") real(DP), intent(out) :: t !! Simulation time integer(I4B), intent(out) :: ierr !! Error code @@ -502,7 +512,7 @@ module subroutine io_read_frame_cb(self, iu, param, form, t, ierr) implicit none class(swiftest_cb), intent(inout) :: self !! Swiftest central body object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters character(*), intent(in) :: form !! Input format code ("XV" or "EL") real(DP), intent(out) :: t !! Simulation time integer(I4B), intent(out) :: ierr !! Error code @@ -512,7 +522,7 @@ module subroutine io_read_frame_system(self, iu, param, form, t, ierr) implicit none class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters character(*), intent(in) :: form !! Input format code ("XV" or "EL") real(DP), intent(out) :: t !! Current simulation time integer(I4B), intent(out) :: ierr !! Error code @@ -531,13 +541,13 @@ end function io_read_hdr module subroutine io_read_initialize_system(self, param) implicit none class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters end subroutine io_read_initialize_system module subroutine io_write_discard(self, param, discards) implicit none class(swiftest_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters class(swiftest_body), intent(inout) :: discards !! Swiftest discard object end subroutine io_write_discard @@ -554,7 +564,7 @@ module subroutine io_write_frame_body(self, iu, param, t, dt) implicit none class(swiftest_body), intent(in) :: self !! Swiftest particle object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Step size end subroutine io_write_frame_body @@ -563,7 +573,7 @@ module subroutine io_write_frame_cb(self, iu, param, t, dt) implicit none class(swiftest_cb), intent(in) :: self !! Swiftest central body object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Step size end subroutine io_write_frame_cb @@ -572,7 +582,7 @@ module subroutine io_write_frame_system(self, iu, param, t, dt) implicit none class(swiftest_nbody_system), intent(in) :: self !! Swiftest system object integer(I4B), intent(inout) :: iu !! Unit number for the output file to write frame to - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: t !! Current simulation time real(DP), intent(in) :: dt !! Step size end subroutine io_write_frame_system @@ -633,7 +643,7 @@ end subroutine setup_body module subroutine setup_construct_system(system, param) implicit none class(swiftest_nbody_system), allocatable, intent(inout) :: system !! Swiftest system object - type(swiftest_parameters), intent(in) :: param !! Swiftest parameters parameters + type(swiftest_parameters), intent(in) :: param !! Swiftest parameters end subroutine setup_construct_system module subroutine setup_pl(self,n) @@ -655,13 +665,13 @@ end subroutine setup_set_msys module subroutine setup_set_mu_pl(self, cb) implicit none class(swiftest_pl), intent(inout) :: self !! Swiftest massive body object - class(swiftest_cb), intent(inout) :: cb !! Swiftest central body objectt + class(swiftest_cb), intent(inout) :: cb !! Swiftest central body object end subroutine setup_set_mu_pl module subroutine setup_set_mu_tp(self, cb) implicit none class(swiftest_tp), intent(inout) :: self !! Swiftest test particle object - class(swiftest_cb), intent(inout) :: cb !! Swiftest central body objectt + class(swiftest_cb), intent(inout) :: cb !! Swiftest central body object end subroutine setup_set_mu_tp module subroutine setup_set_rhill(self,cb) @@ -680,7 +690,7 @@ module subroutine user_getacch_body(self, cb, param, t) implicit none class(swiftest_body), intent(inout) :: self !! Swiftest massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time end subroutine user_getacch_body diff --git a/src/modules/symba.f90 b/src/modules/symba.f90 index bb0361d5c..82ff837a1 100644 --- a/src/modules/symba.f90 +++ b/src/modules/symba.f90 @@ -457,7 +457,7 @@ module subroutine symba_set_initial_conditions(symba_plA, symba_tpA, param) implicit none type(symba_pl), intent(inout) :: symba_plA !! SyMBA massive body structure type(symba_tp), intent(inout) :: symba_tpA !! SyMBA test particle structure - type(swiftest_parameters) :: param !! Input collection of on parameters + type(swiftest_parameters) :: param !! Current run configuration parameters of on parameters end subroutine symba_set_initial_conditions !> Method to remove the inactive symba test particles and spill them to a discard object @@ -745,7 +745,7 @@ subroutine symba_encounter_dummy_input(self,param) !! This method is needed in order to extend the abstract type swiftest_body. It does nothing implicit none class(symba_encounter), intent(inout) :: self !! SyMBA encounter data structure - type(swiftest_parameters),intent(in) :: param !! Input collection of on parameters + type(swiftest_parameters),intent(in) :: param !! Current run configuration parameters of on parameters return end subroutine symba_encounter_dummy_input diff --git a/src/modules/whm_classes.f90 b/src/modules/whm_classes.f90 index 02e4c0806..af6d62106 100644 --- a/src/modules/whm_classes.f90 +++ b/src/modules/whm_classes.f90 @@ -112,7 +112,7 @@ module subroutine whm_step_pl(self, cb, param, t, dt) implicit none class(whm_pl), intent(inout) :: self !! WHM massive body object class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), intent(in) :: dt !! Stepsize end subroutine whm_step_pl @@ -123,7 +123,7 @@ module subroutine whm_getacch_pl(self, cb, param, t) implicit none class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time end subroutine whm_getacch_pl @@ -132,7 +132,7 @@ module subroutine whm_drift_pl(self, cb, param, dt) implicit none class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structur - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: dt !! Stepsize end subroutine whm_drift_pl @@ -169,14 +169,14 @@ module subroutine whm_gr_getacch_pl(self, cb, param) implicit none class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of end subroutine whm_gr_getacch_pl module pure subroutine whm_gr_p4_pl(self, param, dt) use swiftest_classes, only : swiftest_parameters implicit none class(whm_pl), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters real(DP), intent(in) :: dt !! Step size end subroutine whm_gr_p4_pl @@ -184,14 +184,14 @@ module pure subroutine whm_gr_vh2pv_pl(self, param) use swiftest_classes, only : swiftest_parameters implicit none class(whm_pl), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters end subroutine whm_gr_vh2pv_pl module pure subroutine whm_gr_pv2vh_pl(self, param) use swiftest_classes, only : swiftest_parameters implicit none class(whm_pl), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters end subroutine whm_gr_pv2vh_pl !> WHM test particle constructor @@ -206,7 +206,7 @@ module subroutine whm_drift_tp(self, cb, param, dt) implicit none class(whm_tp), intent(inout) :: self !! WHM test particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: dt !! Stepsize end subroutine whm_drift_tp @@ -217,7 +217,7 @@ module subroutine whm_getacch_tp(self, cb, pl, param, t, xh) class(whm_tp), intent(inout) :: self !! WHM test particle data structure class(swiftest_cb), intent(inout) :: cb !! Generic Swiftest central body particle data structuree class(whm_pl), intent(inout) :: pl !! WHM massive body particle data structure. - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), dimension(:,:), intent(in) :: xh !! Heliocentric positions of planets end subroutine whm_getacch_tp @@ -228,7 +228,7 @@ module subroutine whm_step_tp(self, cb, pl, param, t, dt) class(whm_tp), intent(inout) :: self !! WHM test particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure class(whm_pl), intent(inout) :: pl !! WHM massive body data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), intent(in) :: dt !! Stepsize end subroutine whm_step_tp @@ -245,14 +245,14 @@ module subroutine whm_gr_getacch_tp(self, cb, param) implicit none class(whm_tp), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of end subroutine whm_gr_getacch_tp module pure subroutine whm_gr_p4_tp(self, param, dt) use swiftest_classes, only : swiftest_parameters implicit none class(whm_tp), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters real(DP), intent(in) :: dt !! Step size end subroutine whm_gr_p4_tp @@ -260,21 +260,21 @@ module pure subroutine whm_gr_vh2pv_tp(self, param) use swiftest_classes, only : swiftest_parameters implicit none class(whm_tp), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters end subroutine whm_gr_vh2pv_tp module pure subroutine whm_gr_pv2vh_tp(self, param) use swiftest_classes, only : swiftest_parameters implicit none class(whm_tp), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters end subroutine whm_gr_pv2vh_tp module subroutine whm_setup_system(self, param) use swiftest_classes, only : swiftest_parameters implicit none class(whm_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(inout) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of on parameters end subroutine whm_setup_system module subroutine whm_spill_pl(self, discards, lspill_list) @@ -298,7 +298,7 @@ module subroutine whm_step_system(self, param) use swiftest_classes, only : swiftest_parameters implicit none class(whm_nbody_system), intent(inout) :: self !! WHM system object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters end subroutine whm_step_system end interface diff --git a/src/rmvs/rmvs_getacch.f90 b/src/rmvs/rmvs_getacch.f90 index 6201c42da..15fbc3b7a 100644 --- a/src/rmvs/rmvs_getacch.f90 +++ b/src/rmvs/rmvs_getacch.f90 @@ -13,7 +13,7 @@ module subroutine rmvs_getacch_tp(self, cb, pl, param, t, xh) class(rmvs_tp), intent(inout) :: self !! RMVS test particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree class(whm_pl), intent(inout) :: pl !! WHM massive body particle data structure. - class(swiftest_parameters), intent(in) :: param !! Input collection of parameter + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameter real(DP), intent(in) :: t !! Current time real(DP), dimension(:,:), intent(in) :: xh !! Heliocentric positions of planets ! Internals diff --git a/src/rmvs/rmvs_setup.f90 b/src/rmvs/rmvs_setup.f90 index 95634e0a1..845f8d5b0 100644 --- a/src/rmvs/rmvs_setup.f90 +++ b/src/rmvs/rmvs_setup.f90 @@ -86,7 +86,7 @@ module subroutine rmvs_setup_system(self, param) implicit none ! Arguments class(rmvs_nbody_system), intent(inout) :: self !! RMVS system object - class(swiftest_parameters), intent(inout) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of parameters ! Internals integer(I4B) :: i, j diff --git a/src/rmvs/rmvs_step.f90 b/src/rmvs/rmvs_step.f90 index 4d864e807..0fad19590 100644 --- a/src/rmvs/rmvs_step.f90 +++ b/src/rmvs/rmvs_step.f90 @@ -11,7 +11,7 @@ module subroutine rmvs_step_system(self, param) implicit none ! Arguments class(rmvs_nbody_system), intent(inout) :: self !! RMVS nbody system object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters ! Internals logical :: lencounter, lfirstpl, lfirsttp real(DP) :: rts @@ -77,7 +77,7 @@ subroutine rmvs_step_out(pl, cb, tp, dt, param) class(rmvs_cb), intent(inout) :: cb !! RMVS central body object class(rmvs_tp), intent(inout) :: tp !! RMVS test particle object real(DP), intent(in) :: dt !! Step size - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters ! Internals integer(I4B) :: outer_index, j, k real(DP) :: dto, outer_time, rts @@ -131,7 +131,7 @@ subroutine rmvs_step_in(pl, cb, tp, param, outer_time, dto) class(rmvs_pl), intent(inout) :: pl !! RMVS massive body object class(rmvs_cb), intent(inout) :: cb !! RMVS central body object class(rmvs_tp), intent(inout) :: tp !! RMVS test particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: outer_time !! Current time real(DP), intent(in) :: dto !! Step size ! Internals @@ -386,7 +386,7 @@ subroutine rmvs_peri_tp(tp, pl, t, dt, lfirst, inner_index, ipleP, param) logical, intent(in) :: lfirst !! Logical flag indicating whether current invocation is the first integer(I4B), intent(in) :: inner_index !! Outer substep number within current set integer(I4B), intent(in) :: ipleP !! index of RMVS planet being closely encountered - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters ! Internals integer(I4B) :: i, id1, id2 real(DP) :: r2, mu, rhill2, vdotr, a, peri, capm, tperi, rpl @@ -465,7 +465,7 @@ subroutine rmvs_make_planetocentric(pl, cb, tp, param) class(rmvs_pl), intent(inout) :: pl !! RMVS test particle object class(rmvs_cb), intent(inout) :: cb !! RMVS central body particle type class(rmvs_tp), intent(inout) :: tp !! RMVS test particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters ! Internals integer(I4B) :: i, j, inner_index, ipc2hc logical, dimension(:), allocatable :: encmask diff --git a/src/setup/setup.f90 b/src/setup/setup.f90 index 753c3e90c..779cab908 100644 --- a/src/setup/setup.f90 +++ b/src/setup/setup.f90 @@ -9,7 +9,7 @@ module subroutine setup_construct_system(system, param) implicit none ! Arguments class(swiftest_nbody_system), allocatable, intent(inout) :: system !! Swiftest system object - type(swiftest_parameters), intent(in) :: param !! Swiftest parameters parameters + type(swiftest_parameters), intent(in) :: param !! Swiftest parameters select case(param%integrator) case (BS) diff --git a/src/user/user_getacch.f90 b/src/user/user_getacch.f90 index 59b922f15..e3733303a 100644 --- a/src/user/user_getacch.f90 +++ b/src/user/user_getacch.f90 @@ -11,7 +11,7 @@ module subroutine user_getacch_body(self, cb, param, t) ! Arguments class(swiftest_body), intent(inout) :: self !! Swiftest massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of user parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of user parameters real(DP), intent(in) :: t !! Current time return diff --git a/src/whm/whm_drift.f90 b/src/whm/whm_drift.f90 index d5f915b13..19213bc23 100644 --- a/src/whm/whm_drift.f90 +++ b/src/whm/whm_drift.f90 @@ -12,7 +12,7 @@ module subroutine whm_drift_pl(self, cb, param, dt) ! Arguments class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structur - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: dt !! Stepsize ! Internals integer(I4B) :: i @@ -75,7 +75,7 @@ module subroutine whm_drift_tp(self, cb, param, dt) ! Arguments class(whm_tp), intent(inout) :: self !! WHM test particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: dt !! Stepsize ! Internals integer(I4B) :: i diff --git a/src/whm/whm_getacch.f90 b/src/whm/whm_getacch.f90 index 2bfed8d8f..128915360 100644 --- a/src/whm/whm_getacch.f90 +++ b/src/whm/whm_getacch.f90 @@ -12,7 +12,7 @@ module subroutine whm_getacch_pl(self, cb, param, t) ! Arguments class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time ! Internals integer(I4B) :: i @@ -51,7 +51,7 @@ module subroutine whm_getacch_tp(self, cb, pl, param, t, xh) class(whm_tp), intent(inout) :: self !! WHM test particle data structure class(swiftest_cb), intent(inout) :: cb !! Generic Swiftest central body particle data structuree class(whm_pl), intent(inout) :: pl !! Generic Swiftest massive body particle data structure. - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), dimension(:,:), intent(in) :: xh !! Heliocentric positions of planets ! Internals diff --git a/src/whm/whm_gr.f90 b/src/whm/whm_gr.f90 index e938b0b9b..073ddc2ae 100644 --- a/src/whm/whm_gr.f90 +++ b/src/whm/whm_gr.f90 @@ -12,7 +12,7 @@ module subroutine whm_gr_getacch_pl(self, cb, param) ! Arguments class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of ! Internals integer(I4B) :: i real(DP), dimension(NDIM) :: suma @@ -50,7 +50,7 @@ module subroutine whm_gr_getacch_tp(self, cb, param) ! Arguments class(whm_tp), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structuree - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of ! Internals integer(I4B) :: i real(DP) :: rjmag4, beta @@ -78,7 +78,7 @@ module pure subroutine whm_gr_p4_pl(self, param, dt) implicit none ! Arguments class(whm_pl), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters real(DP), intent(in) :: dt !! Step size ! Internals integer(I4B) :: i @@ -104,7 +104,7 @@ module pure subroutine whm_gr_p4_tp(self, param, dt) implicit none ! Arguments class(whm_tp), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters real(DP), intent(in) :: dt !! Step size ! Internals integer(I4B) :: i @@ -128,7 +128,7 @@ module pure subroutine whm_gr_pv2vh_pl(self, param) implicit none ! Arguments class(whm_pl), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters ! Internals integer(I4B) :: i real(DP), dimension(:,:), allocatable :: vh !! Temporary holder of pseudovelocity for in-place conversion @@ -154,7 +154,7 @@ module pure subroutine whm_gr_pv2vh_tp(self, param) implicit none ! Arguments class(whm_tp), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters ! Internals integer(I4B) :: i real(DP), dimension(:,:), allocatable :: vh !! Temporary holder of pseudovelocity for in-place conversion @@ -180,7 +180,7 @@ module pure subroutine whm_gr_vh2pv_pl(self, param) implicit none ! Arguments class(whm_pl), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters ! Internals integer(I4B) :: i real(DP), dimension(:,:), allocatable :: pv !! Temporary holder of pseudovelocity for in-place conversion @@ -206,7 +206,7 @@ module pure subroutine whm_gr_vh2pv_tp(self, param) implicit none ! Arguments class(whm_tp), intent(inout) :: self !! Swiftest particle object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters ! Internals integer(I4B) :: i real(DP), dimension(:,:), allocatable :: pv !! Temporary holder of pseudovelocity for in-place conversion @@ -234,7 +234,7 @@ pure subroutine gr_vel2pseudovel(param, mu, xh, vh, pv) !! Adapted from David A. Minton's Swifter routine gr_vel2pseudovel.f90 implicit none - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: mu !! G * (Mcb + m), G = gravitational constant, Mcb = mass of central body, m = mass of body real(DP), dimension(:), intent(in) :: xh !! Heliocentric position vector real(DP), dimension(:), intent(in) :: vh !! Heliocentric velocity vector @@ -306,7 +306,7 @@ pure subroutine gr_pseudovel2vel(param, mu, xh, pv, vh) !! !! Adapted from David A. Minton's Swifter routine gr_pseudovel2vel.f90 implicit none - class(swiftest_parameters), intent(in) :: param !! Input collection of parameters parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of parameters real(DP), intent(in) :: mu !! G * (Mcb + m), G = gravitational constant, Mcb = mass of central body, m = mass of body real(DP), dimension(:), intent(in) :: xh !! Heliocentric position vector real(DP), dimension(:), intent(in) :: pv !! Pseudovelocity velocity vector - see Saha & Tremain (1994), eq. (32) diff --git a/src/whm/whm_setup.f90 b/src/whm/whm_setup.f90 index af3f4c774..cdec4e1fb 100644 --- a/src/whm/whm_setup.f90 +++ b/src/whm/whm_setup.f90 @@ -80,7 +80,7 @@ module subroutine whm_setup_system(self, param) implicit none ! Arguments class(whm_nbody_system), intent(inout) :: self !! Swiftest system object - class(swiftest_parameters), intent(inout) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters of on parameters call io_read_initialize_system(self, param) ! Make sure that the discard list gets allocated initially call self%tp_discards%setup(self%tp%nbody) diff --git a/src/whm/whm_step.f90 b/src/whm/whm_step.f90 index da504963b..05aeebde9 100644 --- a/src/whm/whm_step.f90 +++ b/src/whm/whm_step.f90 @@ -2,7 +2,6 @@ use swiftest contains - module subroutine whm_step_system(self, param) !! author: David A. Minton !! @@ -13,7 +12,7 @@ module subroutine whm_step_system(self, param) implicit none ! Arguments class(whm_nbody_system), intent(inout) :: self !! WHM nbody system object - class(swiftest_parameters), intent(in) :: param !! Input collection of on parameters + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of on parameters select type(cb => self%cb) class is (whm_cb) @@ -48,7 +47,7 @@ module subroutine whm_step_pl(self, cb, param, t, dt) ! Arguments class(whm_pl), intent(inout) :: self !! WHM massive body particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), intent(in) :: dt !! Stepsize ! Internals @@ -88,7 +87,7 @@ module subroutine whm_step_tp(self, cb, pl, param, t, dt) class(whm_tp), intent(inout) :: self !! WHM test particle data structure class(swiftest_cb), intent(inout) :: cb !! Swiftest central body particle data structure class(whm_pl), intent(inout) :: pl !! WHM massive body data structure - class(swiftest_parameters), intent(in) :: param !! Input collection of + class(swiftest_parameters), intent(in) :: param !! Current run configuration parameters of real(DP), intent(in) :: t !! Current time real(DP), intent(in) :: dt !! Stepsize ! Internals