RAMSES-CPP

RAMSES-CPP aims to provide a functional and physically consistent alternative to the original Fortran implementation while maintaining strict bit-perfect parity in data structures and I/O.

View the Project on GitHub SinsuSquid/RAMSES-CPP

Installation

Building RAMSES-CPP is designed to be straightforward using modern CMake.

Prerequisites

To build RAMSES-CPP from source, ensure you have the following installed on your system:

Building from Source

  1. Clone the repository:
    git clone https://github.com/SinsuSquid/RAMSES_CPP.git
    cd RAMSES_CPP
    
  2. Create a build directory and configure with CMake:
    mkdir build && cd build
    cmake ..
    
  3. Compile the project:
    make -j$(nproc)
    

    This will generate the dimensional executables (e.g., ramses_1d, ramses_3d) and the reference verification tool verify_ref in the build/ directory.

CMake Configuration Options

You can customize the build using the following CMake flags:

Example: Building for 2D MHD

cmake .. -DRAMSES_NDIM=2 -DRAMSES_USE_MHD=ON
make -j

Parallel Support (MPI)

If an MPI implementation is installed and detected by CMake, the build system will automatically define RAMSES_USE_MPI. This enables the LoadBalancer class for distributed execution and compiles the code to run across multiple MPI ranks. If MPI is not found, the code safely falls back to a sequential build.