From cf8523a106f56c05eb9fb7ac63ef6133a0fa56b0 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Thu, 19 Aug 2021 08:16:50 -0400 Subject: [PATCH] Refactored read_in subroutines for naming consistency --- src/io/io.f90 | 10 +++++----- src/modules/swiftest_classes.f90 | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/io/io.f90 b/src/io/io.f90 index 592b22c8f..f463493bd 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -721,7 +721,7 @@ module subroutine io_param_writer(self, unit, iotype, v_list, iostat, iomsg) write(param_name, Afmt) "DT"; write(param_value, Rfmt) param%dt; write(unit, Afmt, err = 667, iomsg = iomsg) adjustl(param_name), adjustl(param_value) write(param_name, Afmt) "CB_IN"; write(param_value, Afmt) trim(adjustl(param%incbfile)); write(unit, Afmt, err = 667, iomsg = iomsg) adjustl(param_name), adjustl(param_value) write(param_name, Afmt) "PL_IN"; write(param_value, Afmt) trim(adjustl(param%inplfile)); write(unit, Afmt, err = 667, iomsg = iomsg) adjustl(param_name), adjustl(param_value) - write(param_name, Afmt) "TP_in"; write(param_value, Afmt) trim(adjustl(param%intpfile)); write(unit, Afmt, err = 667, iomsg = iomsg) adjustl(param_name), adjustl(param_value) + write(param_name, Afmt) "TP_IN"; write(param_value, Afmt) trim(adjustl(param%intpfile)); write(unit, Afmt, err = 667, iomsg = iomsg) adjustl(param_name), adjustl(param_value) write(param_name, Afmt) "IN_TYPE"; write(param_value, Afmt) trim(adjustl(param%in_type)); write(unit, Afmt, err = 667, iomsg = iomsg) adjustl(param_name), adjustl(param_value) if (param%istep_out > 0) then write(param_name, Afmt) "ISTEP_OUT"; write(param_value, Ifmt) param%istep_out; write(unit, Afmt, err = 667, iomsg = iomsg) adjustl(param_name), adjustl(param_value) @@ -784,7 +784,7 @@ module subroutine io_param_writer(self, unit, iotype, v_list, iostat, iomsg) end subroutine io_param_writer - module subroutine io_read_body_in(self, param) + module subroutine io_read_in_body(self, param) !! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott !! !! Read in either test particle or massive body data @@ -873,10 +873,10 @@ module subroutine io_read_body_in(self, param) 667 continue write(*,*) 'Error reading in initial conditions file: ',trim(adjustl(errmsg)) return - end subroutine io_read_body_in + end subroutine io_read_in_body - module subroutine io_read_cb_in(self, param) + module subroutine io_read_in_cb(self, param) !! author: David A. Minton !! !! Reads in central body data @@ -925,7 +925,7 @@ module subroutine io_read_cb_in(self, param) 667 continue write(*,*) "Error reading central body file: " // trim(adjustl(errmsg)) call util_exit(FAILURE) - end subroutine io_read_cb_in + end subroutine io_read_in_cb function io_read_encounter(t, id1, id2, Gmass1, Gmass2, radius1, radius2, & diff --git a/src/modules/swiftest_classes.f90 b/src/modules/swiftest_classes.f90 index aed6f23b0..39b782ed2 100644 --- a/src/modules/swiftest_classes.f90 +++ b/src/modules/swiftest_classes.f90 @@ -128,7 +128,7 @@ module swiftest_classes real(DP), dimension(NDIM) :: L0 = 0.0_DP !! Initial angular momentum of the central body real(DP), dimension(NDIM) :: dL = 0.0_DP !! Change in angular momentum of the central body contains - procedure :: initialize => io_read_cb_in !! I/O routine for reading in central body data + procedure :: initialize => io_read_in_cb !! I/O routine for reading in central body data procedure :: read_frame => io_read_frame_cb !! I/O routine for reading out a single frame of time-series data for the central body procedure :: write_frame => io_write_frame_cb !! I/O routine for writing out a single frame of time-series data for the central body end type swiftest_cb @@ -174,7 +174,7 @@ module swiftest_classes procedure :: drift => drift_body !! Loop through bodies and call Danby drift routine on heliocentric variables procedure :: v2pv => gr_vh2pv_body !! Converts from velocity to psudeovelocity for GR calculations using symplectic integrators procedure :: pv2v => gr_pv2vh_body !! Converts from psudeovelocity to velocity for GR calculations using symplectic integrators - procedure :: initialize => io_read_body_in !! Read in body initial conditions from a file + procedure :: initialize => io_read_in_body !! Read in body initial conditions from a file procedure :: read_frame => io_read_frame_body !! I/O routine for writing out a single frame of time-series data for the central body procedure :: write_frame => io_write_frame_body !! I/O routine for writing out a single frame of time-series data for the central body procedure :: accel_obl => obl_acc_body !! Compute the barycentric accelerations of bodies due to the oblateness of the central body @@ -610,17 +610,17 @@ module subroutine io_param_writer(self, unit, iotype, v_list, iostat, iomsg) character(len=*), intent(inout) :: iomsg !! Message to pass if iostat /= 0 end subroutine io_param_writer - module subroutine io_read_body_in(self, param) + module subroutine io_read_in_body(self, param) implicit none class(swiftest_body), intent(inout) :: self !! Swiftest body object class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters - end subroutine io_read_body_in + end subroutine io_read_in_body - module subroutine io_read_cb_in(self, param) + module subroutine io_read_in_cb(self, param) implicit none class(swiftest_cb), intent(inout) :: self !! Swiftest central body object class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters - end subroutine io_read_cb_in + end subroutine io_read_in_cb module subroutine io_read_param_in(self, param_file_name) implicit none