Code Monkey home page Code Monkey logo

2lptic's Introduction

Warning I generated 2048^3 ICs (subsampled from a 3072^3) with this IC code and those simulations were wrong. However, 1024^3 simulations generated with this were fine. Presumably, something is wrong with (at least) the subsample fraction logic - do not use the subsampling features in this code -- i.e., set both GlassTileFacSampleNumerator and GlassTileFacSampleNumerator = 1.

Description

This repo contains 2LPT IC generation code from Roman Scoccimarro. Original code can be found here

Improvements

  1. The code has been updated with lots of checks about INT overflow and 64 bit ID overflows.
  2. Dependency on Numerical Recipes in C has been replaced with gsl
  3. This code can accept P(k) generated by CAMB (contribution from Greg Poole)
  4. Can generate consistent particle IDs across simulations of different resolutions (contribution from Greg Poole)

Note this version produces a header compatible with standard public Gadget2. In particular, the number of particles in excess of INT_MAX (~2e9) is stored in npartTotalHighWord in the header, rather than npartTotal[2].

Installation

Pre-requisites

  1. An MPI capable compiler mpicc
  2. Double precision MPI FFTW2 libraries (fftw2.1.5)
  3. gsl library

Compilation

  1. Setup the Makefile options according to the simulation IC. Default options are matched to running a single-species dark matter only cosmological simulation.
  2. Check the paths to MPI, FFTW and GSL libraries
  3. Typing make should generate the executable

Running

  1. Edit the parameter file. See example parameter file provided in example.params
  2. Launch the MPI process mpirun -np Ncpus ./2LPTic simulation.param (refer to your computing cluster documentation for submitting and running jobs)

Author

Author is Roman Scoccimarro (I think based on N-GenIC developed by Volker Springel). Current repo contains contribution from Greg Poole for the CAMB P(k) handling and consistent particle IDs generation.

Maintained by Manodeep Sinha. Any new bugs are probably my fault.

2lptic's People

Contributors

manodeep avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

sarazahoor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.