From 873f5d12a517d69516f1492ba3ec06204e987ec4 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Wed, 11 Aug 2021 16:58:52 -0400 Subject: [PATCH] Fixed bug in which bodies with more than one encounter have their accelrations zeroed out between evaluations of each pair --- src/symba/symba_kick.f90 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/symba/symba_kick.f90 b/src/symba/symba_kick.f90 index 8625b3d81..b247a9a7d 100644 --- a/src/symba/symba_kick.f90 +++ b/src/symba/symba_kick.f90 @@ -133,13 +133,13 @@ module subroutine symba_kick_pltpenc(self, system, dt, irec, sgn) 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 - pl%ah(:,ind1(k)) = 0.0_DP - pl%ah(:,ind2(k)) = 0.0_DP - else - tp%ah(:,ind2(k)) = 0.0_DP - end if if (isplpl) then lgoodlevel = (pl%levelg(ind1(k)) >= irm1) .and. (pl%levelg(ind2(k)) >= irm1) else