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

Commit

Permalink
Removed timer and test file code
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Dec 16, 2021
1 parent 99fdda6 commit 59cb5f2
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/encounter/encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ module subroutine encounter_check_all_plplm(param, nplm, nplt, xplm, vplm, xplt,
integer(I8B), dimension(:), allocatable :: ind
integer(I4B), dimension(:), allocatable :: itmp
logical, dimension(:), allocatable :: ltmp
type(walltimer) :: timer

if (param%ladaptive_encounters_plpl .and. (.not. skipit)) then
npl = nplm + nplt
Expand All @@ -126,7 +125,6 @@ module subroutine encounter_check_all_plplm(param, nplm, nplt, xplm, vplm, xplt,
tmp_param%ladaptive_encounters_plpl = .false.

! Start with the pl-pl group
!call timer%start()
call encounter_check_all_plpl(tmp_param, nplm, xplm, vplm, rencm, dt, nenc, index1, index2, lvdotr)

if (param%lencounter_sas_plpl) then
Expand All @@ -136,8 +134,6 @@ module subroutine encounter_check_all_plplm(param, nplm, nplt, xplm, vplm, xplt,
call encounter_check_all_triangular_plplm(nplm, nplt, xplm, vplm, xplt, vplt, rencm, renct, dt, &
plmplt_nenc, plmplt_index1, plmplt_index2, plmplt_lvdotr)
end if
!call timer%stop()
!call timer%report("Encounter check pl-plm: ")

if (skipit) then
skipit = .false.
Expand Down Expand Up @@ -170,12 +166,6 @@ module subroutine encounter_check_all_plplm(param, nplm, nplt, xplm, vplm, xplt,
call util_sort_rearrange(index2, ind, nenc)
call util_sort_rearrange(lvdotr, ind, nenc)

! ! TEMP FOR TESTING
open(unit=22,file="enclist.csv", status="replace")
do k = 1_I8B, nenc
write(22,*) index1(k), index2(k)
end do
close(22)
end if

return
Expand Down Expand Up @@ -269,7 +259,6 @@ subroutine encounter_check_all_sort_and_sweep_plpl(npl, x, v, renc, dt, nenc, in
type(encounter_bounding_box), save :: boundingbox
logical, dimension(:), allocatable :: lencounter
integer(I2B), dimension(npl) :: vshift_min, vshift_max
type(walltimer), save :: timer

if (npl == 0) return

Expand Down Expand Up @@ -573,7 +562,6 @@ subroutine encounter_check_all_triangular_plpl(npl, x, v, renc, dt, nenc, index1
logical, dimension(npl) :: lencounteri, lvdotri
integer(I4B), dimension(:), allocatable, save :: ind_arr
type(encounter_list), dimension(npl) :: lenc
type(walltimer), save :: timer

call util_index_array(ind_arr, npl)

Expand Down Expand Up @@ -622,7 +610,6 @@ subroutine encounter_check_all_triangular_plplm(nplm, nplt, xplm, vplm, xplt, vp
logical, dimension(nplt) :: lencounteri, lvdotri
integer(I4B), dimension(:), allocatable, save :: ind_arr
type(encounter_list), dimension(nplm) :: lenc
type(walltimer), save :: timer

call util_index_array(ind_arr, nplt)

Expand Down Expand Up @@ -938,12 +925,10 @@ module subroutine encounter_check_sweep_aabb_double_list(self, n1, n2, x1, v1, x
integer(I4B), dimension(:), allocatable, save :: ind_arr
integer(I8B) :: ibeg, iend
real(DP), dimension(2*(n1+n2)) :: xind, yind, zind, vxind, vyind, vzind, rencind
type(walltimer) :: timer1, timer2, timer3, timer4

ntot = n1 + n2
call util_index_array(ind_arr, ntot)

!call timer1%start()
do concurrent(dim = 1:SWEEPDIM)
loverlap_by_dimension(dim,:) = (self%aabb(dim)%ibeg(:) + 1_I8B) < (self%aabb(dim)%iend(:) - 1_I8B)
where(self%aabb(dim)%ind(:) > ntot)
Expand Down Expand Up @@ -1053,7 +1038,6 @@ module subroutine encounter_check_sweep_aabb_single_list(self, n, x, v, renc, dt
type(encounter_list), dimension(n) :: lenc !! Array of encounter lists (one encounter list per body)
integer(I4B), dimension(:), allocatable, save :: ind_arr
integer(I8B) :: ibeg, iend
type(walltimer) :: timer0

call util_index_array(ind_arr, n)
dim = 1
Expand All @@ -1077,7 +1061,6 @@ module subroutine encounter_check_sweep_aabb_single_list(self, n, x, v, renc, dt
loverlap(:) = (self%aabb(dim)%ibeg(:) + 1_I8B) < (self%aabb(dim)%iend(:) - 1_I8B)
where(.not.loverlap(:)) lenc(:)%nenc = 0

! call timer0%start()
!$omp parallel do default(private) schedule(static)&
!$omp shared(self, ext_ind, lenc, loverlap, x, v, renc, xind, yind, zind, vxind, vyind, vzind, rencind) &
!$omp firstprivate(n, dt, dim)
Expand All @@ -1095,8 +1078,6 @@ module subroutine encounter_check_sweep_aabb_single_list(self, n, x, v, renc, dt
end if
end do
!$omp end parallel do
! call timer0%stop()
! call timer0%report("timer0: ")

call encounter_check_collapse_ragged_list(lenc, n, nenc, index1, index2, lvdotr)

Expand Down

0 comments on commit 59cb5f2

Please sign in to comment.