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

Commit

Permalink
Added new symba_system_snapshot object to track the system through en…
Browse files Browse the repository at this point in the history
…counters
  • Loading branch information
daminton committed Dec 4, 2022
1 parent c094acc commit c659ca1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/encounter/encounter_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module subroutine encounter_io_write_frame(self, nciu, param)
implicit none
! Arguments
class(encounter_list), intent(in) :: self !! Swiftest encounter structure
class(encounter_io_parameters), intent(inout) :: nciu !! Parameters used to identify a particular encounter io NetCDF dataset
class(encounter_io_parameters), intent(inout) :: nciu !! Parameters used to identify a particular encounter io NetCDF dataset
class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters
! Internals
integer(I4B) :: tslot,i,old_mode, n
Expand Down
21 changes: 21 additions & 0 deletions src/modules/symba_classes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,14 @@ module symba_classes
final :: symba_util_final_system !! Finalizes the SyMBA nbody system object - deallocates all allocatables
end type symba_nbody_system

type, extends(helio_nbody_system) :: symba_system_snapshot
contains
procedure :: snapshot => symba_util_take_system_snapshot
final :: symba_util_final_snapshot
end type

interface

module function symba_collision_check_encounter(self, system, param, t, dt, irec) result(lany_collision)
use swiftest_classes, only : swiftest_parameters
implicit none
Expand Down Expand Up @@ -374,6 +381,15 @@ module subroutine symba_util_set_renc(self, scale)
integer(I4B), intent(in) :: scale !! Current recursion depth
end subroutine symba_util_set_renc

module subroutine symba_util_take_system_snapshot(self, system, param, t)
use swiftest_classes, only : swiftest_parameters
implicit none
class(symba_system_snapshot), intent(inout) :: self !! SyMBA nbody system snapshot object
class(symba_nbody_system), intent(in) :: system !! SyMBA nbody system object
class(symba_parameters), intent(in) :: param !! Current run configuration parameters
real(DP), intent(in) :: t !! current time
end subroutine symba_util_take_system_snapshot

module subroutine symba_io_param_reader(self, unit, iotype, v_list, iostat, iomsg)
implicit none
class(symba_parameters), intent(inout) :: self !! Current run configuration parameters with SyMBA additionss
Expand Down Expand Up @@ -648,6 +664,11 @@ module subroutine symba_util_final_pl(self)
type(symba_pl), intent(inout) :: self !! SyMBA massive body object
end subroutine symba_util_final_pl

module subroutine symba_util_final_snapshot(self)
implicit none
type(symba_system_snapshot), intent(inout) :: self !! SyMBA nbody system object
end subroutine symba_util_final_snapshot

module subroutine symba_util_final_system(self)
implicit none
type(symba_nbody_system), intent(inout) :: self !! SyMBA nbody system object
Expand Down

0 comments on commit c659ca1

Please sign in to comment.