1 |
if (( N mod 2) = 0 ) then ! final one way acceleration if N even
|
2 | end if |
3 | ! combine accelerations for final result - circulating particle in i'th |
4 | ! position corresponds to fixed particle (i-(N-1)/2) |
5 | Grav = A + cshift (Ac, dim=2, shift = (N-1)/2) |
6 | end function Grav |