From a3b8b0dfb65db250b2dbaa462dc42e887b42442d Mon Sep 17 00:00:00 2001 From: David A Minton Date: Mon, 25 Oct 2021 10:05:58 -0400 Subject: [PATCH] Fixed array shape problem that was causing the wrong bodies to be considered for encounters in the sweep phase --- src/encounter/encounter_check.f90 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/encounter/encounter_check.f90 b/src/encounter/encounter_check.f90 index 298bf7d4f..b6dae95fb 100644 --- a/src/encounter/encounter_check.f90 +++ b/src/encounter/encounter_check.f90 @@ -981,9 +981,11 @@ module subroutine encounter_check_sweep_aabb_single_list(self, n, nenc, index1, call util_index_array(ind_arr, n) allocate(ibeg(SWEEPDIM * n)) allocate(iend(SWEEPDIM * n)) - do dim = 1, SWEEPDIM - ibeg((dim - 1) * n + 1:dim * n) = self%aabb(dim)%ibeg(:) - iend((dim - 1) * n + 1:dim * n) = self%aabb(dim)%iend(:) + do i = 1, n + do dim = 1, SWEEPDIM + ibeg((i - 1) * SWEEPDIM + dim) = self%aabb(dim)%ibeg(i) + iend((i - 1) * SWEEPDIM + dim) = self%aabb(dim)%iend(i) + end do end do ! Sweep the intervals for each of the massive bodies along one dimension