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

Commit

Permalink
Merge branch 'debug'
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Oct 25, 2021
2 parents 971afb1 + 25f9c4d commit c37ab71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/encounter/encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,6 @@ module pure subroutine encounter_check_sort_aabb_1D(self, n, extent_arr)
real(DP), dimension(:), intent(in) :: extent_arr !! Array of extents of size 2*n
! Internals
integer(I4B) :: i, j, k, ibox, jbox
integer(I4B), dimension(2) :: extent
logical, dimension(:), allocatable :: lfresh

call util_sort(extent_arr, self%ind)
Expand Down
9 changes: 6 additions & 3 deletions src/util/util_sort.f90
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ module pure subroutine util_sort_index_dp(arr, ind)
allocate(ind(n))
ind = [(i, i=1, n)]
end if
allocate(tmparr, source=arr)
allocate(tmparr, mold=arr)
tmparr(:) = arr(ind(:))
call qsort_DP(tmparr, ind)

return
Expand Down Expand Up @@ -221,7 +222,8 @@ module pure subroutine util_sort_index_i4b(arr, ind)
allocate(ind(n))
ind = [(i, i=1, n)]
end if
allocate(tmparr, source=arr)
allocate(tmparr, mold=arr)
tmparr(:) = arr(ind(:))
call qsort_I4B(tmparr, ind)

return
Expand Down Expand Up @@ -348,7 +350,8 @@ module pure subroutine util_sort_index_sp(arr, ind)
allocate(ind(n))
ind = [(i, i=1, n)]
end if
allocate(tmparr, source=arr)
allocate(tmparr, mold=arr)
tmparr(:) = arr(ind(:))
call qsort_SP(tmparr, ind)

return
Expand Down

0 comments on commit c37ab71

Please sign in to comment.