diff --git a/src/symba/symba_step.f90 b/src/symba/symba_step.f90 index dda813b82..ae8645fba 100644 --- a/src/symba/symba_step.f90 +++ b/src/symba/symba_step.f90 @@ -69,17 +69,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 @@ -89,10 +91,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