Páginas

domingo, 29 de março de 2015

Instalar 2LPT

(...)

  • Paracompilar o código, você deve ter fftw-2.1.5 instalado em seu sistema. Para mais detalhes, consulte este post.
- To be able to compile the code, you should have FFTW 2.1.5 installed in your system
(go to fftw.org if you don't have it)

- If your installation of FFTW is not in the standard directory, change the first line
in 2lpt_ic.f to get the info file from the appropriate directory

- To compile the 2LPT code,

g77 -O3 -o 2lpt_ic.exe 2lpt_ic.f  -lsrfftw -lsfftw

the last two flags assume FFTW is installed in both single and double precision,
thus the "s" is appended to pick up the single precision version of the library.

- The code asks for a few parameters, in turn

Omega (Omega_m=dark+baryons) Omega_Lambda

h (Hubble in units of 100 km/s/Mpc)

Transfer function file (a CMBFAST file is assumed)

sigma8 at z=0

Box Dimensions in Mpc/h

redshift of the box (at which initial conditions are desired)

ZA (enter 0) or 2LPT (enter 1) initial conditions

Number of Files per Snapshot (this is from Gadget2, how many files you want the output in)

Output file

initialization (an integer to set the random number generator)

- An input file with default values is included, you can just run the code as

2lpt_ic.exe < input_test

to make sure it works after compilation. It will generate two ouput files, pos_test.0
and pos_test.1


- To change the number of particles you must edit the third line of the code (2lpt_ic.f)

Just change the integer j, The number of particles is Ngrid**3=(2*j)**3

- The output of the code includes a header appropriate for Gadget2 runs.

Nenhum comentário:

Postar um comentário