From 9859c24883e9b7537e65182d68f48cc7cbf35448 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Wed, 11 Jan 2023 17:06:25 -0500 Subject: [PATCH] Removed old discard io stuff that is no longer necessary now that collision info is stored in the before/after snapshots in collisions.nc --- src/CMakeLists.txt | 1 - src/collision/collision_resolve.f90 | 5 +---- src/swiftest/swiftest_io.f90 | 24 ------------------------ src/swiftest/swiftest_module.f90 | 7 ------- src/symba/symba_discard.f90 | 3 --- src/symba/symba_io.f90 | 16 ---------------- 6 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 src/symba/symba_io.f90 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4fd3a1cce..1f657d65c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -72,7 +72,6 @@ SET(FAST_MATH_FILES ${SRC}/symba/symba_drift.f90 ${SRC}/symba/symba_encounter_check.f90 ${SRC}/symba/symba_gr.f90 - ${SRC}/symba/symba_io.f90 ${SRC}/symba/symba_step.f90 ${SRC}/symba/symba_util.f90 ${SRC}/walltime/walltime_implementations.f90 diff --git a/src/collision/collision_resolve.f90 b/src/collision/collision_resolve.f90 index d89cdac8c..07bdc6fb3 100644 --- a/src/collision/collision_resolve.f90 +++ b/src/collision/collision_resolve.f90 @@ -583,10 +583,7 @@ module subroutine collision_resolve_plpl(self, nbody_system, param, t, dt, irec) if ((nbody_system%pl_adds%nbody == 0) .and. (nbody_system%pl_discards%nbody == 0)) exit - ! Save the add/discard information to file - call nbody_system%write_discard(param) - - ! Rearrange the arrays: Remove discarded bodies, add any new bodies, resort, and recompute all indices and encounter lists + ! Rearrange the arrays: Remove discarded bodies, add any new bodies, re-sort, and recompute all indices and encounter lists call pl%rearray(nbody_system, param) ! Destroy the add/discard list so that we don't append the same body multiple times if another collision is detected diff --git a/src/swiftest/swiftest_io.f90 b/src/swiftest/swiftest_io.f90 index ec2ba10ea..65a13e403 100644 --- a/src/swiftest/swiftest_io.f90 +++ b/src/swiftest/swiftest_io.f90 @@ -2943,30 +2943,6 @@ module subroutine swiftest_io_toupper(string) end subroutine swiftest_io_toupper - module subroutine swiftest_io_write_discard(self, param) - !! author: David A. Minton - !! - !! Write the metadata of the discarded body to the output file - implicit none - class(swiftest_nbody_system), intent(inout) :: self !! SyMBA nbody system object - class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters - ! Internals - - associate(pl => self%pl, npl => self%pl%nbody, pl_adds => self%pl_adds, nc => self%system_history%nc) - - call nc%open(param) - if (self%tp_discards%nbody > 0) call self%tp_discards%write_info(nc, param) - if (self%pl_discards%nbody == 0) return - - call self%pl_discards%write_info(nc, param) - call nc%close() - end associate - - return - - end subroutine swiftest_io_write_discard - - module subroutine swiftest_io_write_frame_system(self, param) !! author: The Purdue Swiftest Team - David A. Minton, Carlisle A. Wishard, Jennifer L.L. Pouplin, and Jacob R. Elliott !! diff --git a/src/swiftest/swiftest_module.f90 b/src/swiftest/swiftest_module.f90 index 211e048f3..d818ce3c2 100644 --- a/src/swiftest/swiftest_module.f90 +++ b/src/swiftest/swiftest_module.f90 @@ -389,7 +389,6 @@ module swiftest procedure :: write_hdr => swiftest_io_netcdf_write_hdr_system !! Write a header for an output frame in NetCDF format procedure :: read_particle_info => swiftest_io_netcdf_read_particle_info_system !! Read in particle metadata from file procedure :: read_in => swiftest_io_read_in_system !! Reads the initial conditions for an nbody system - procedure :: write_discard => swiftest_io_write_discard !! Write out information about discarded and merged planets and test particles in SyMBA procedure :: write_frame_system => swiftest_io_write_frame_system !! Write a frame of input data from file procedure :: obl_pot => swiftest_obl_pot_system !! Compute the contribution to the total gravitational potential due solely to the oblateness of the central body procedure :: dealloc => swiftest_util_dealloc_system !! Deallocates all allocatables and resets all values to defaults. Acts as a base for a finalizer @@ -864,12 +863,6 @@ module subroutine swiftest_io_toupper(string) character(*), intent(inout) :: string !! String to make upper case end subroutine swiftest_io_toupper - module subroutine swiftest_io_write_discard(self, param) - implicit none - class(swiftest_nbody_system), intent(inout) :: self !! SyMBA nbody system object - class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters - end subroutine swiftest_io_write_discard - module subroutine swiftest_io_write_frame_system(self, param) implicit none class(swiftest_nbody_system), intent(inout) :: self !! Swiftest nbody_system object diff --git a/src/symba/symba_discard.f90 b/src/symba/symba_discard.f90 index 471fe230c..05a5b45cf 100644 --- a/src/symba/symba_discard.f90 +++ b/src/symba/symba_discard.f90 @@ -371,9 +371,6 @@ module subroutine symba_discard_pl(self, nbody_system, param) call symba_discard_nonplpl_conservation(self, nbody_system, param) - ! Save the add/discard information to file - call nbody_system%write_discard(param) - call pl%rearray(nbody_system, param) if (param%lenergy) then diff --git a/src/symba/symba_io.f90 b/src/symba/symba_io.f90 deleted file mode 100644 index e5fdbc25d..000000000 --- a/src/symba/symba_io.f90 +++ /dev/null @@ -1,16 +0,0 @@ -!! Copyright 2022 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh -!! This file is part of Swiftest. -!! Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License -!! as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -!! Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty -!! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -!! You should have received a copy of the GNU General Public License along with Swiftest. -!! If not, see: https://www.gnu.org/licenses. - -submodule (symba) s_symba_io - use swiftest -contains - - -end submodule s_symba_io -