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

Commit

Permalink
Browse files Browse the repository at this point in the history
Corrected bugs that prevented SIM
  • Loading branch information
daminton committed Apr 14, 2021
1 parent 2af2274 commit 567af34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/rmvs/rmvs_encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module function rmvs_encounter_check_tp(self, cb, pl, dt, rts) result(lencounter
logical :: lflag

associate(tp => self, ntp => self%nbody, npl => pl%nbody, rhill => pl%rhill, xht => self%xh, vht => self%vh, &
xbeg => self%xbeg, vbeg => self%vbeg, status => tp%status, plencP => tp%plencP, nenc => pl%nenc)
xbeg => self%xbeg, vbeg => self%vbeg, status => self%status, plencP => self%plencP, nenc => pl%nenc)
r2crit(:) = (rts * rhill(:))**2
plencP(:) = 0
do j = 1, npl
Expand Down
7 changes: 5 additions & 2 deletions src/whm/whm_getacch.f90
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,12 @@ pure subroutine whm_getacch_ah3_tp(cb, pl, tp, xh)
integer(I4B) :: i, j
real(DP) :: rji2, irij3, fac
real(DP), dimension(NDIM) :: dx
real(DP), dimension(:,:), allocatable :: aht

associate(ntp => tp%nbody, npl => pl%nbody, msun => cb%Gmass, Gmpl => pl%Gmass, &
xht => tp%xh, aht => tp%ah)

xht => tp%xh)

allocate(aht, source=tp%ah)
if (ntp == 0) return
do j = 1, npl
!$omp simd private(dx,rji2,irij3,fac) reduction(-:aht)
Expand All @@ -231,6 +233,7 @@ pure subroutine whm_getacch_ah3_tp(cb, pl, tp, xh)
aht(:, i) = aht(:, i) - fac * dx(:)
end do
end do
call move_alloc(aht, tp%ah)
end associate
return
end subroutine whm_getacch_ah3_tp
Expand Down

0 comments on commit 567af34

Please sign in to comment.