From 4d2fb37cfc1f552e89ffcc8b208a21ccf43523d9 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Fri, 9 Dec 2022 19:11:50 -0500 Subject: [PATCH] Keep on adding snapshot stuff --- src/modules/fraggle_classes.f90 | 1 + src/symba/symba_collision.f90 | 1 + src/symba/symba_util.f90 | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/fraggle_classes.f90 b/src/modules/fraggle_classes.f90 index 79c929710..0aaead00b 100644 --- a/src/modules/fraggle_classes.f90 +++ b/src/modules/fraggle_classes.f90 @@ -66,6 +66,7 @@ module fraggle_classes real(DP), dimension(:), allocatable :: rotmag !! Array of rotation magnitudes of individual fragments real(DP), dimension(:), allocatable :: v_r_mag !! Array of radial direction velocity magnitudes of individual fragments real(DP), dimension(:), allocatable :: v_t_mag !! Array of tangential direction velocity magnitudes of individual fragments + class(swiftest_pl), allocatable :: pl !! A snapshot of the fragments created in the collision ! Energy and momentum book-keeping variables that characterize the whole system of fragments real(DP) :: ke_orbit !! Current orbital kinetic energy of the system of fragments in the collisional frame diff --git a/src/symba/symba_collision.f90 b/src/symba/symba_collision.f90 index 12822cb07..53e0a84bc 100644 --- a/src/symba/symba_collision.f90 +++ b/src/symba/symba_collision.f90 @@ -831,6 +831,7 @@ subroutine symba_collision_mergeaddsub(system, param, status) ! Log the properties of the new bodies call fraggle_io_log_pl(plnew, param) + allocate(system%fragments%pl, source=plnew) ! Append the new merged body to the list nstart = pl_adds%nbody + 1 diff --git a/src/symba/symba_util.f90 b/src/symba/symba_util.f90 index 853a3db0f..eedb632fc 100644 --- a/src/symba/symba_util.f90 +++ b/src/symba/symba_util.f90 @@ -1323,12 +1323,12 @@ module subroutine symba_util_take_collision_snapshot(self, param, t, stage) end associate case("after") - + allocate(snapshot%fragments, source=self%fragments) end select - ! Save the self - call symba_util_save_storage(self,snapshot,t) + ! Save the snapshot + !call symba_util_save_storage(self,snapshot,t) return end subroutine symba_util_take_collision_snapshot