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

Commit

Permalink
Removed bad array index in potential energy summation.
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jan 27, 2022
1 parent 50fed7a commit f4fb1ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/util_get_energy_momentum.f90
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ subroutine util_get_energy_potential_triangular(npl, lmask, GMcb, Gmass, mass, x
do concurrent(j = i+1:npl, lmask(i) .and. lmask(j))
pepl(j) = - (Gmass(i) * mass(j)) / norm2(xb(:, i) - xb(:, j))
end do
pe = pe + sum(pepl(i+1:npl), lmask(i) .and. lmask(j))
pe = pe + sum(pepl(i+1:npl), lmask(i))
end do
!$omp end parallel do
pe = pe + sum(pecb(1:npl), lmask(1:npl))
Expand Down

0 comments on commit f4fb1ae

Please sign in to comment.