From ef2af76c8152e6fa7c80b7f2e5a380c35275fb03 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 19 Oct 2021 10:12:50 -0400 Subject: [PATCH 1/3] Added allocate statement for test particles --- src/netcdf/netcdf.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/netcdf/netcdf.f90 b/src/netcdf/netcdf.f90 index ab05d3c2a..384a7f437 100644 --- a/src/netcdf/netcdf.f90 +++ b/src/netcdf/netcdf.f90 @@ -677,6 +677,7 @@ module subroutine netcdf_read_particle_info_system(self, iu, plmask, tpmask) do i = 1, ntp call tp%info(i)%set_value(status="ACTIVE") end do + allocate(tpind(ntp)) tpind(:) = pack([(i, i = 1, idmax)], tpmask(:)) end if From e7efb54c45becaa8c5ddb2dd4235762f12794a4f Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 19 Oct 2021 10:13:14 -0400 Subject: [PATCH 2/3] Added io conservation report line for the beginning of a restart loop --- src/main/swiftest_driver.f90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/swiftest_driver.f90 b/src/main/swiftest_driver.f90 index 284706d10..eb2a375a1 100644 --- a/src/main/swiftest_driver.f90 +++ b/src/main/swiftest_driver.f90 @@ -75,8 +75,9 @@ program swiftest_driver !$ write(*,'(a)') ' OpenMP parameters:' !$ write(*,'(a)') ' ------------------' !$ write(*,'(a,i3,/)') ' Number of threads = ', nthreads - call integration_timer%reset() write(*, *) " *************** Main Loop *************** " + if (param%lrestart .and. param%lenergy) call nbody_system%conservation_report(param, lterminal=.true.) + call integration_timer%reset() do iloop = 1, nloops !> Step the system forward in time call integration_timer%start() From f5807f2e53fc58c9b31de8617776e54961826198 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 19 Oct 2021 10:13:41 -0400 Subject: [PATCH 3/3] Fixed bug in which the wrong value was printed to the dump files for the escaped angular momentum --- src/io/io.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/io.f90 b/src/io/io.f90 index b64fde43d..28ef8d143 100644 --- a/src/io/io.f90 +++ b/src/io/io.f90 @@ -1000,7 +1000,7 @@ module subroutine io_param_writer(self, unit, iotype, v_list, iostat, iomsg) call io_param_writer_one("LTOT_ORIG", param%Ltot_orig(:), unit) call io_param_writer_one("LORBIT_ORIG", param%Lorbit_orig(:), unit) call io_param_writer_one("LSPIN_ORIG", param%Lspin_orig(:), unit) - call io_param_writer_one("LESCAPE", param%Lspin_orig(:), unit) + call io_param_writer_one("LESCAPE", param%Lescape(:), unit) call io_param_writer_one("GMESCAPE",param%GMescape, unit) call io_param_writer_one("ECOLLISIONS",param%Ecollisions, unit) call io_param_writer_one("EUNTRACKED",param%Euntracked, unit)