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

Commit

Permalink
Added locality spec to do concurrent
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Feb 18, 2024
1 parent 1d9c7d1 commit a0881ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/collision/collision_generate.f90
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ module subroutine collision_generate_merge(self, nbody_system, param, t)
fragments%density(1) = fragments%mass(1) / volume
fragments%radius(1) = (3._DP * volume / (4._DP * PI))**(THIRD)
if (param%lrotation) then
#ifdef DOCONLOC
do concurrent(i = 1:NDIM) shared(impactors, fragments, L_spin_new)
#else
do concurrent(i = 1:NDIM)
#endif
fragments%Ip(i,1) = sum(impactors%mass(:) * impactors%Ip(i,:))
L_spin_new(i) = sum(impactors%L_orbit(i,:) + impactors%L_spin(i,:))
end do
Expand Down

0 comments on commit a0881ab

Please sign in to comment.