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

Commit

Permalink
Merge branch 'debug'
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Mar 1, 2022
2 parents 56cd09a + b1b7bc8 commit 83d6814
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/symba/symba_step.f90
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ module subroutine symba_step_system(self, param, t, dt)
lencounter = pl%encounter_check(param, self, dt, 0) .or. tp%encounter_check(param, self, dt, 0)
if (lencounter) then
call self%interp(param, t, dt)
param%lfirstkick = .true.
else
self%irec = -1
call helio_step_system(self, param, t, dt)
param%lfirstkick = pl%lfirst
end if
param%lfirstkick = pl%lfirst
end select
end select
end select
Expand Down Expand Up @@ -69,17 +68,19 @@ module subroutine symba_step_interp_system(self, param, t, dt)
select type(cb => system%cb)
class is (symba_cb)
system%irec = -1
call pl%vh2vb(cb)
if (pl%lfirst) call pl%vh2vb(cb)
call pl%lindrift(cb, dth, lbeg=.true.)
call pl%kick(system, param, t, dth, lbeg=.true.)
if (param%lgr) call pl%gr_pos_kick(system, param, dth)
call pl%drift(system, param, dt)

call tp%vh2vb(vbcb = -cb%ptbeg)
call tp%lindrift(cb, dth, lbeg=.true.)
call tp%kick(system, param, t, dth, lbeg=.true.)
if (param%lgr) call tp%gr_pos_kick(system, param, dth)
call tp%drift(system, param, dt)
if (tp%nbody > 0) then
if (tp%lfirst) call tp%vh2vb(vbcb = -cb%ptbeg)
call tp%lindrift(cb, dth, lbeg=.true.)
call tp%kick(system, param, t, dth, lbeg=.true.)
if (param%lgr) call tp%gr_pos_kick(system, param, dth)
call tp%drift(system, param, dt)
end if

call system%recursive_step(param, t, 0)
system%irec = -1
Expand All @@ -89,10 +90,12 @@ module subroutine symba_step_interp_system(self, param, t, dt)
call pl%lindrift(cb, dth, lbeg=.false.)
call pl%vb2vh(cb)

if (param%lgr) call tp%gr_pos_kick(system, param, dth)
call tp%kick(system, param, t, dth, lbeg=.false.)
call tp%lindrift(cb, dth, lbeg=.false.)
call tp%vb2vh(vbcb = -cb%ptend)
if (tp%nbody > 0) then
if (param%lgr) call tp%gr_pos_kick(system, param, dth)
call tp%kick(system, param, t, dth, lbeg=.false.)
call tp%lindrift(cb, dth, lbeg=.false.)
call tp%vb2vh(vbcb = -cb%ptend)
end if
end select
end select
end select
Expand Down

0 comments on commit 83d6814

Please sign in to comment.