From 348b8de25356d0a4d90f5b63ed7a2b34e6e85a09 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Sat, 17 Dec 2022 21:24:17 -0500 Subject: [PATCH] Fixed issue where failed fragmentation didn't get the copy of the "after" system for recording --- src/collision/collision_io.f90 | 4 ++-- src/symba/symba_collision.f90 | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/collision/collision_io.f90 b/src/collision/collision_io.f90 index e22937577..5afb3ab8e 100644 --- a/src/collision/collision_io.f90 +++ b/src/collision/collision_io.f90 @@ -227,9 +227,9 @@ module subroutine collision_io_write_frame_snapshot(self, nc, param) if (allocated(pl)) deallocate(pl) select case(stage) case(1) - allocate(pl, source=system%before%pl) + allocate(pl, source=self%collision_system%before%pl) case(2) - allocate(pl, source=system%after%pl) + allocate(pl, source=self%collision_system%after%pl) end select npl = pl%nbody do i = 1, npl diff --git a/src/symba/symba_collision.f90 b/src/symba/symba_collision.f90 index 3af2c7e99..0c0150997 100644 --- a/src/symba/symba_collision.f90 +++ b/src/symba/symba_collision.f90 @@ -60,6 +60,7 @@ module function symba_collision_casedisruption(system, param, t) result(status) pl%ldiscard(impactors%idx(:)) = .false. pl%lcollision(impactors%idx(:)) = .false. end select + allocate(collision_system%after%pl, source=collision_system%before%pl) ! Be sure to save the pl so that snapshots still work else ! Populate the list of new bodies nfrag = fragments%nbody