From 1c252ba86e851c01cb5a601fe8a117ba4c61646f Mon Sep 17 00:00:00 2001 From: David A Minton Date: Wed, 14 Dec 2022 12:55:09 -0500 Subject: [PATCH] Got correct time value into collision snapshot history files --- src/encounter/encounter_util.f90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/encounter/encounter_util.f90 b/src/encounter/encounter_util.f90 index 9a1be2901..9d9c97f11 100644 --- a/src/encounter/encounter_util.f90 +++ b/src/encounter/encounter_util.f90 @@ -448,7 +448,7 @@ subroutine encounter_util_save_collision(collision_history, snapshot) end subroutine encounter_util_save_collision - subroutine encounter_util_save_encounter(encounter_history, snapshot, t) + subroutine encounter_util_save_encounter(encounter_history, snapshot) !! author: David A. Minton !! !! Checks the current size of the encounter storage against the required size and extends it by a factor of 2 more than requested if it is too small. @@ -459,7 +459,6 @@ subroutine encounter_util_save_encounter(encounter_history, snapshot, t) ! Arguments type(encounter_storage(*)), allocatable, intent(inout) :: encounter_history !! SyMBA encounter storage object class(encounter_snapshot), intent(in) :: snapshot !! Encounter snapshot object - real(DP), intent(in) :: t !! The time of the snapshot ! Internals type(encounter_storage(nframes=:)), allocatable :: tmp integer(I4B) :: i, nnew, nold, nbig @@ -542,6 +541,7 @@ module subroutine encounter_util_snapshot_collision(self, param, system, t, arg) allocate(fraggle_snapshot :: snapshot) allocate(snapshot%colliders, source=system%colliders) allocate(snapshot%fragments, source=system%fragments) + snapshot%t = t select type(param) class is (symba_parameters) call encounter_util_save_collision(param%collision_history,snapshot) @@ -663,7 +663,7 @@ module subroutine encounter_util_snapshot_encounter(self, param, system, t, arg) ! Save the snapshot param%encounter_history%nid = param%encounter_history%nid + ntp_snap + npl_snap - call encounter_util_save_encounter(param%encounter_history,snapshot,t) + call encounter_util_save_encounter(param%encounter_history,snapshot) case("closest") associate(plplenc_list => system%plplenc_list, pltpenc_list => system%pltpenc_list) if (any(plplenc_list%lclosest(:))) then @@ -722,7 +722,7 @@ module subroutine encounter_util_snapshot_encounter(self, param, system, t, arg) pl_snap%vh(:,2) = vb(:,2) + vcom(:) call pl_snap%sort("id", ascending=.true.) - call encounter_util_save_encounter(param%encounter_history,snapshot,snapshot%t) + call encounter_util_save_encounter(param%encounter_history,snapshot) end if end do