diff --git a/src/encounter/encounter_check.f90 b/src/encounter/encounter_check.f90 index bbfa98ba3..b125d0ff9 100644 --- a/src/encounter/encounter_check.f90 +++ b/src/encounter/encounter_check.f90 @@ -189,7 +189,7 @@ module subroutine encounter_check_all_plplm(param, nplm, nplt, xplm, vplm, xplt, call move_alloc(itmp, index1) allocate(itmp(nenc+plmplt_nenc)) itmp(1:nenc) = index2(1:nenc) - itmp(nenc+1:nenc+plmplt_nenc) = plmplt_index2(1:plmplt_nenc) + itmp(nenc+1:nenc+plmplt_nenc) = plmplt_index2(1:plmplt_nenc) + nplm ! Be sure to shift these indices back to their natural range call move_alloc(itmp, index2) allocate(ltmp(nenc+plmplt_nenc)) ltmp(1:nenc) = lvdotr(1:nenc) @@ -517,9 +517,6 @@ subroutine encounter_check_all_sort_and_sweep_plplm(nplm, nplt, xplm, vplm, xplt call encounter_check_all(nenc, index1, index2, xplm, vplm, xplt, vplt, rencm, renct, dt, lencounter, lvdotr) - ! Shift the tiny body indices back to their natural range - index2(:) = index2(:) + nplm - call encounter_check_reduce_broadphase(ntot, nenc, index1, index2, lencounter, lvdotr) end if return