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

Commit

Permalink
Fixed bugs where conservation report was being taken when it wasn't a…
Browse files Browse the repository at this point in the history
…sked for
  • Loading branch information
daminton committed Jan 15, 2023
1 parent 107fc88 commit 8f31031
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/swiftest/swiftest_driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 1 addition & 2 deletions src/swiftest/swiftest_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand Down

0 comments on commit 8f31031

Please sign in to comment.