Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Got correct time value into collision snapshot history files
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Dec 14, 2022
1 parent d556d8a commit 1c252ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/encounter/encounter_util.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 1c252ba

Please sign in to comment.