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

Commit

Permalink
Removed the extra vb2vh calculation in the conservation report that w…
Browse files Browse the repository at this point in the history
…as messing up the initial conditions of restart runs
  • Loading branch information
daminton committed Jan 25, 2023
1 parent cd3c7ca commit efd84a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/swiftest/swiftest_driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ program swiftest_driver
if (idump == dump_cadence) then
idump = 0
call nbody_system%dump(param)

end if

call integration_timer%report(message="Integration steps:", unit=display_unit, nsubsteps=istep_out)
Expand Down
6 changes: 5 additions & 1 deletion src/swiftest/swiftest_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ module subroutine swiftest_io_conservation_report(self, param, lterminal)

associate(nbody_system => self, pl => self%pl, cb => self%cb, npl => self%pl%nbody, display_unit => param%display_unit, nc => self%system_history%nc)

call pl%vb2vh(cb)
select type(self)
class is (helio_nbody_system) ! Don't convert vh to vb for Helio-based integrators, because they are already have that calculated
class is (whm_nbody_system)
call pl%vh2vb(cb)
end select
call pl%rh2rb(cb)

call nbody_system%get_energy_and_momentum(param)
Expand Down

0 comments on commit efd84a7

Please sign in to comment.