Page 1 of 1

a piece of code

Posted: April 08 2005
by Anze Slosar
I need an efficient piece of code that would do the following:

given a correlation function or a power spectrum distribute N points in a box so that their distribution corresponds to a gaussian field which is a possible realisation of the given the power spectrum.

This problem must have been solved thousands of years ago for setting up the initial conditions for N-body simulations. So, could someone tell me where to look / what to download.

a piece of code

Posted: April 08 2005
by Niayesh Afshordi
I think you can find a code here:
http://www.astro.princeton.edu/~esirko/ic/

Re: a piece of code

Posted: April 08 2005
by Anze Slosar
Niayesh Afshordi wrote:I think you can find a code here:
http://www.astro.princeton.edu/~esirko/ic/
Thanks. I remember seeing that paper, but completelly forgot about it... Anyway, I find the ic flowcharts (http://www.astro.princeton.edu/~esirko/ ... chart.html) quite amusing, a bit Dexter's lab like... (no offence, please, I trust code is superb.)