
31 May
2011
31 May
'11
12:25 a.m.
Hello! I'm studying repa package and trying to implement O(N^2) n-body code. I'm using Array DIM2 Double to represent the collection of particles. I've managed to write a function which calculates the energy of one particle in the field of others but I'm struggling to write a code to calculate the energy of the whole system. Maybe someone here has already written such code?