diff --git a/src/encounter/encounter_io.f90 b/src/encounter/encounter_io.f90 index ba00e3634..1e2f97a1a 100644 --- a/src/encounter/encounter_io.f90 +++ b/src/encounter/encounter_io.f90 @@ -21,6 +21,7 @@ module subroutine encounter_io_dump_storage_list(self, param) class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters end subroutine encounter_io_dump_storage_list + module subroutine encounter_io_initialize_output(self, param) !! author: David A. Minton !! @@ -33,6 +34,7 @@ module subroutine encounter_io_initialize_output(self, param) return end subroutine encounter_io_initialize_output + module subroutine encounter_io_open_file(self, param, readonly) !! author: David A. Minton !! diff --git a/src/modules/symba_classes.f90 b/src/modules/symba_classes.f90 index 42b676c22..988d75d95 100644 --- a/src/modules/symba_classes.f90 +++ b/src/modules/symba_classes.f90 @@ -30,6 +30,7 @@ module symba_classes real(DP) :: min_GMfrag = -1.0_DP !! Smallest G*mass that can be produced in a fragmentation event integer(I4B), dimension(:), allocatable :: seed !! Random seeds logical :: lfragmentation = .false. !! Do fragmentation modeling instead of simple merger. + character(STRMAX) :: encounter_save = "NONE" !! Indicate how encounter and/or fragmentation data should be saved contains procedure :: reader => symba_io_param_reader procedure :: writer => symba_io_param_writer diff --git a/src/symba/symba_io.f90 b/src/symba/symba_io.f90 index 38ead96f1..9cfd8ba9a 100644 --- a/src/symba/symba_io.f90 +++ b/src/symba/symba_io.f90 @@ -63,6 +63,9 @@ module subroutine symba_io_param_reader(self, unit, iotype, v_list, iostat, ioms read(param_value, *) param%GMTINY case ("MIN_GMFRAG") read(param_value, *) param%min_GMfrag + case ("ENCOUNTER_SAVE") + call io_toupper(param_value) + read(param_value, *) param%encounter_save case("SEED") read(param_value, *) nseeds_from_file ! Because the number of seeds can vary between compilers/systems, we need to make sure we can handle cases in which the input file has a different @@ -113,6 +116,13 @@ module subroutine symba_io_param_reader(self, unit, iotype, v_list, iostat, ioms ! All reporting of collision information in SyMBA (including mergers) is now recorded in the Fraggle logfile call io_log_start(param, FRAGGLE_LOG_OUT, "Fraggle logfile") + if ((param%encounter_save /= "NONE") .and. (param%encounter_save /= "ALL") .and. (param%encounter_save /= "FRAGMENTATION")) then + write(iomsg,*) 'Invalid encounter_save parameter: ',trim(adjustl(param%out_type)) + write(iomsg,*) 'Valid options are NONE, ALL, or FRAGMENTATION' + iostat = -1 + return + end if + ! Call the base method (which also prints the contents to screen) call io_param_reader(param, unit, iotype, v_list, iostat, iomsg) end associate