From 8f3103142941a7749af9f5c6c41a6153c1514b96 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Sat, 14 Jan 2023 23:46:50 -0500 Subject: [PATCH] Fixed bugs where conservation report was being taken when it wasn't asked for --- src/swiftest/swiftest_driver.f90 | 2 +- src/swiftest/swiftest_io.f90 | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/swiftest/swiftest_driver.f90 b/src/swiftest/swiftest_driver.f90 index 0258ce16d..eed4fe446 100644 --- a/src/swiftest/swiftest_driver.f90 +++ b/src/swiftest/swiftest_driver.f90 @@ -79,8 +79,8 @@ program swiftest_driver else call nbody_system%conservation_report(param, lterminal=.false.) ! This will save the initial values of energy and momentum end if + call nbody_system%conservation_report(param, lterminal=.true.) end if - call nbody_system%conservation_report(param, lterminal=.true.) call system_history%take_snapshot(param,nbody_system) call nbody_system%dump(param) diff --git a/src/swiftest/swiftest_io.f90 b/src/swiftest/swiftest_io.f90 index 2bc8143fe..cfc60ca3c 100644 --- a/src/swiftest/swiftest_io.f90 +++ b/src/swiftest/swiftest_io.f90 @@ -1114,13 +1114,12 @@ module function swiftest_io_netcdf_read_frame_system(self, nc, param) result(ier call netcdf_io_check( nf90_get_var(nc%id, nc%radius_varid, rtemp, start=[1, tslot], count=[idmax,1]), "netcdf_io_read_frame_system nf90_getvar radius_varid" ) cb%radius = rtemp(1) - ! Set initial central body radius for SyMBA bookkeeping - cb%R0 = cb%radius if (npl > 0) pl%radius(:) = pack(rtemp, plmask) else cb%radius = param%rmin if (npl > 0) pl%radius(:) = 0.0_DP end if + cb%R0 = cb%radius if (param%lrotation) then call netcdf_io_check( nf90_get_var(nc%id, nc%Ip_varid, vectemp, start=[1, 1, tslot], count=[NDIM,idmax,1]), "netcdf_io_read_frame_system nf90_getvar Ip_varid" )