Created
September 13, 2011 19:25
-
-
Save madebyjeffrey/1214807 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subroutine step(positions, velocities) | |
real, dimension(p,2), intent(inout) :: positions, velocities | |
! verify lengths (? unnecessary?) | |
if (size(positions, 1) .ne. size(velocities, 1)) then | |
print *, "The sizes of two arrays are not the same" | |
end if | |
! move the particles to the new position | |
do i = 1, size(positions, 1) | |
positions(i, 1) = positions(i, 1) + velocities(i, 1) | |
positions(i, 2) = positions(i, 2) + velocities(i, 2) | |
end do | |
end subroutine step |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment