This quickstart shows how to build and run a minimal simulation using the NEXT (Newtonian EXact Trajectories) codebase in under 30 seconds on a typical developer machine.
- Git
- CMake (≥ 3.10)
- C++ compiler (Clang, GCC, or MSVC)
- Python 3 (for example input generation)
- OpenMP (for Multi-Threadding)
- HDF5
git clone https://github.com/TimGoTheCreator/NEXT.git
cd NEXTmkdir build
cd build
cmake ..
cmake --build . --config Release
cd ..This produces the next executable in the root directory.
cd examples/TwoBodies
python two_body.py
../../next two_body.txt 8 0.01 0.1 vtuArguments explained:
two_body.txt– input file generated by the Python script8– number of CPU threads0.01– time step0.1– total simulation timevtu– output format (VTK Unstructured Grid)
The simulation outputs a .vtu file in the example directory.
To visualize:
- Open the file in ParaView
- Load the dataset and press Play to view particle trajectories
- Successful compilation of the NEXT C++ engine
- Generation of initial conditions via Python
- Execution of an N-body simulation
- Export of results to a standard visualization format
This workflow is intended as the fastest possible validation that NEXT builds and runs correctly.
- Build times may vary depending on compiler and system.
- For longer or higher-resolution simulations, adjust thread count, timestep, and total time accordingly.
- Additional examples are available under the
examples/directory.
✅ Expected total time: ~20–30 seconds on a modern development machine.