Powered by Barnes-Hut Octree O(N log N), Symplectic KDK Leapfrog Integration, OpenMP, and MPI.
- O(N log N) Barnes-Hut Octree: Scalable spatial tree hierarchy with multipole expansions.
- Symplectic KDK Leapfrog Integrator: Preserves energy stability over extended numerical integration.
- Division-Avoiding Algebra: Optimized force calculations (3–6x speedup by minimizing costly float divisions).
- Hybrid Parallelism: OpenMP multi-threading (multi-core) + MPI (distributed computing cluster).
- Precision Modes: Configurable compile-time switching between
FP32andFP64. - Multi-Format Output: Native support for VTK, VTU (ParaView), and HDF5.
- Python IC Builder: Legacy initial condition scripts (
tools/icbuilder.py).
# Configure build directory
cmake -B build -S .
# Build executable (Release configuration)
cmake --build build --config ReleaseFor detailed platform-specific installation instructions, see:
# Generate initial conditions
cd examples/TwoBodies
python two_body.py
# Run NEXT simulation
../../next two_body.txt <threads> <dt> <dump_interval> <vtk|vtu|hdf5> [max_steps]
# Example: Run 8 threads, dt=0.001, dump every 0.1s, output VTU, for 100 max steps
../../next two_body.txt 8 0.001 0.1 vtu 100input.txt- Path to initial condition particle filethreads- Number of CPU threads (OpenMP)dt- Baseline time stepdump_interval- Simulation time interval between output dumpsformat- Output format (vtk,vtu, orhdf5)[max_steps]- (Optional) Maximum simulation steps before auto-exit