2LPT initial conditions code

The 2LPTIC code provides initial conditions for running cosmological simulations based on second-order Lagrangian Perturbation Theory (2LPT), rather than first-order (Zel'dovich approximation).


See for example this paper for details on why using this is a good idea...


2LPT initial conditions parallel code


This MPI-parallel version of 2LPTic is based on the Zel'dovich n-genic code written by Volker Springel.

Version for Gaussian initial conditions:

  • Download the 2LPT initial conditions parallel code (Gaussian).

    Running this code is simple enough, we provide an example here that was used to run the Carmen simulations in the LasDamas project. The code can run ICs for up to 1625^3 particles.

    You may want to check out Volker's documentation as well. The
    2LPTIC code provides initial conditions in Gadget format.

    This parallel version was developed from Volker's code by Sebastian Pueblas. We also thank Martin Crocce, Andreas Berlind, Cameron McBride, Marc Manera and Manodeep Sinha for useful testing and contributions.

    Version for Local and Non-Local primordial non-Gaussianity (can also run in Gaussian mode):

  • Download the 2LPT initial conditions parallel code with primordial non-Gaussianity.

    This parallel version was developed from the Gaussian code by Marc Manera, based on the algorithm described in this paper.

    Changes:
    December 4, 2012: bug fixes (thanks to Robert Smith) December 20, 2012: several improvements (see readme file)



    2LPT initial conditions serial code


    The serial code is written in Fortran77 and requires the installation of FFTW version 2.1.5. You can read Appendix D2 in this paper to understand how the code works.

  • Download the 2LPT initial conditions serial code.

    Changes:
    June 23, 2006: FFTW plans changed to integer*8 (for 64 bit, also 32 bit compatible) [Thanks to Mike Santos for pointing out this]
    March 19, 2007: bug fixed in definition of hfactor in 2lpt_ic.f, Om0 -> OL0 (this causes a mistake of order 10^-5 in the velocities at z=49) [Thanks to Kohji Yoshikawa for pointing this out]
    September 22, 2007: bug fixed in generation of Gaussian field, modes in kx=Nyquist must be complex conjugates
    September 24, 2007: Added intel compiler version with dynamic allocation