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

Commit

Permalink
Minor rearranging in preparation for building the infrastructure for …
Browse files Browse the repository at this point in the history
…fraggle outputs.
  • Loading branch information
daminton committed Dec 8, 2022
1 parent 706d439 commit 954764f
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/modules/symba_classes.f90
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ module symba_classes
!! NetCDF dimension and variable names for the enounter save object
type, extends(netcdf_parameters) :: symba_io_encounter_parameters
integer(I4B) :: ienc_frame = 1 !! Current frame number for the encounter history
character(STRMAX) :: enc_file = "encounter.nc" !! Encounter output file name
character(STRMAX) :: enc_file !! Encounter output file name
character(NAMELEN) :: level_varname = "level" !! Recursion depth
integer(I4B) :: level_varid !! ID for the recursion level variable
integer(I4B) :: time_dimsize = 0 !! Number of time values in snapshot
Expand All @@ -202,6 +202,20 @@ module symba_classes
end type symba_encounter_storage


type :: symba_encounter_snapshot
!! A simplified version of a SyMBA nbody system object for storing minimal snapshots of the system state during encounters
type(symba_pl) :: pl !! Massive body data structure
type(symba_tp) :: tp !! Test particle data structure
real(DP) :: t = 0.0_DP !! Time at the snapshot
integer(I4B) :: tslot = 0 !! The index for the time array in the final NetCDF file
contains
procedure :: write_encounter_frame => symba_io_encounter_write_frame !! Writes a frame of encounter data to file
procedure :: dealloc => symba_util_dealloc_snapshot !! Deallocates all allocatable arrays
generic :: write_frame => write_encounter_frame !! Writes a snaphot frame to file
final :: symba_util_final_encounter_snapshot
end type symba_encounter_snapshot


!********************************************************************************************************************************
! symba_nbody_system class definitions and method interfaces
!********************************************************************************************************************************
Expand Down Expand Up @@ -229,18 +243,6 @@ module symba_classes
end type symba_nbody_system


type :: symba_encounter_snapshot
type(symba_pl) :: pl !! Massive body data structure
type(symba_tp) :: tp !! Test particle data structure
real(DP) :: t = 0.0_DP !! Time at the snapshot
integer(I4B) :: tslot = 0 !! The index for the time array in the final NetCDF file
contains
procedure :: write_encounter_frame => symba_io_encounter_write_frame !! Writes a frame of encounter data to file
procedure :: dealloc => symba_util_dealloc_snapshot !! Deallocates all allocatable arrays
generic :: write_frame => write_encounter_frame !! Writes a snaphot frame to file
final :: symba_util_final_encounter_snapshot
end type symba_encounter_snapshot

interface

module function symba_collision_check_encounter(self, system, param, t, dt, irec) result(lany_collision)
Expand Down

0 comments on commit 954764f

Please sign in to comment.