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

Commit

Permalink
Fixed array shape problem that was causing the wrong bodies to be con…
Browse files Browse the repository at this point in the history
…sidered for encounters in the sweep phase
  • Loading branch information
daminton committed Oct 25, 2021
1 parent a918968 commit a3b8b0d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/encounter/encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3b8b0d

Please sign in to comment.