518 B

Comparing with the analytical potential

Plot a log-log plot of rho(r):

  • the discrete solution has poissonian error: 1/sqrt(N) where N is the number of particles in the bins

=> ensure the discretization is consistent

Comparing forces

  • Use newtons law by considering only the inner shells: F_i = GM(R_i)/R_i^2

=> this should all be done with the .ascii file (All particles, not yet meshed)

Task2

a) start with only the monopole and compare with the direct summation only then build the tree code