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

Commit

Permalink
Fixed typo in index that was preventing the accelration from being ze…
Browse files Browse the repository at this point in the history
…roed out at the end of an recursive kick
  • Loading branch information
daminton committed Aug 11, 2021
1 parent 873f5d1 commit c231bec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/symba/symba_kick.f90
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,20 @@ module subroutine symba_kick_pltpenc(self, system, dt, irec, sgn)
if (tp%nbody > 0) tp%lmask(:) = tp%status(:) /= INACTIVE

irm1 = irec - 1

if (sgn < 0) then
irecl = irec - 1
else
irecl = irec
end if

if (isplpl) then
pl%ah(:,ind1(1:self%nenc)) = 0.0_DP
pl%ah(:,ind2(1:self%nenc)) = 0.0_DP
else
tp%ah(:,ind2(1:self%nenc)) = 0.0_DP
end if

do k = 1, self%nenc
if (isplpl) then
lgoodlevel = (pl%levelg(ind1(k)) >= irm1) .and. (pl%levelg(ind2(k)) >= irm1)
Expand Down Expand Up @@ -182,7 +185,7 @@ module subroutine symba_kick_pltpenc(self, system, dt, irec, sgn)
pl%vb(:,ind1(k)) = pl%vb(:,ind1(k)) + sgn * dt * pl%ah(:,ind1(k))
pl%vb(:,ind2(k)) = pl%vb(:,ind2(k)) + sgn * dt * pl%ah(:,ind2(k))
pl%ah(:,ind1(k)) = 0.0_DP
pl%ah(:,ind1(k)) = 0.0_DP
pl%ah(:,ind2(k)) = 0.0_DP
end do
else
do k = 1, self%nenc
Expand Down

0 comments on commit c231bec

Please sign in to comment.