From abd655c9d2d74c641c55bfa33121df113a6cd635 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Mon, 25 Oct 2021 10:25:37 -0400 Subject: [PATCH] Fixed array shape problem for the double list version of the sweep --- 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 b6dae95fb..99466dc20 100644 --- a/src/encounter/encounter_check.f90 +++ b/src/encounter/encounter_check.f90 @@ -938,9 +938,11 @@ module subroutine encounter_check_sweep_aabb_double_list(self, n1, n2, nenc, ind call util_index_array(ind_arr, ntot) allocate(ibeg(SWEEPDIM * ntot)) allocate(iend(SWEEPDIM * ntot)) - do dim = 1, SWEEPDIM - ibeg((dim - 1) * ntot + 1:dim * ntot) = self%aabb(dim)%ibeg(:) - iend((dim - 1) * ntot + 1:dim * ntot) = self%aabb(dim)%iend(:) + do i = 1, ntot + 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 ! This will build a ragged pair of index lists inside of the lenc data structure