Skip to content

About

Deterministic, computing and raytracing engine for General Relativity, Post-Newtonian celestial mechanics, relativistic hydrodynamics, and polarized radiative transfer across curved spacetimes.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Relativity-Simulator

Deterministic simulation and ray-tracing engine for General Relativity, Post-Newtonian dynamics, relativistic hydrodynamics, and polarized radiative transfer in curved spacetimes.


Documentation Map

Primary references:


Key Features


Visual Overview

The visual renders and trajectory sequences below were recorded and generated using the integrated Capture Studio workspace widget.

Curved Spacetime Null Geodesic Ray-Tracing (Schwarzschild Metric, M = 60.00)

Schwarzschild Metric Flyby Trajectory (M = 60.00) Schwarzschild Metric Infall Trajectory (M = 60.00)


Building and Installation

Prerequisites

  • C++23 compiler: GCC 13+, Clang 16+, or MSVC 2022 (v19.36+).
  • CMake 3.25+.
  • OpenGL and GLFW (via CMake FetchContent).
  • Vulkan headers and loader (the compute context includes vulkan/vulkan.h); when no compute-capable device is present at run time, the CPU renderer is used.
  • glslangValidator (optional): used by CMake to compile the primary geodesic tracer, cluster tile tracer, and N-body acceleration compute shaders to SPIR-V.
  • Network and compression libraries (via CMake FetchContent when ENGINE_ENABLE_DISTRIBUTED=ON, enabled by default): ENet and LZ4.
  • ffmpeg (optional, run time): video assembly in the Capture Studio.

Standard Build (Release with LTO)

cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_LTO=ON
cmake --build build --config Release -j $(nproc)

Profile-Guided Optimization (PGO) Build

Instrumented build

cmake -B build-pgo -DCMAKE_BUILD_TYPE=Release -DENABLE_PGO_GENERATE=ON
cmake --build build-pgo --config Release -j $(nproc)
./build-pgo/headless_exporter --validate-benchmarks

Optimized build using profile data

cmake -B build-opt -DCMAKE_BUILD_TYPE=Release -DENABLE_PGO_USE=ON
cmake --build build-opt --config Release -j $(nproc)

Running Test Suite

ctest --test-dir build --output-on-failure

Generating Installation Packages (CPack)

cd build
cpack -G TGZ
cpack -G DEB  # Linux Debian/Ubuntu
cpack -G RPM  # Linux Fedora/RHEL
cpack -G NSIS # Windows Installer

Quickstart

Interactive REPL Mode

./build/engine_cli

Available interactive commands (warp, step, set mass, status, etc.) are documented in the Interactive Terminal Commands (REPL) and navigation keybindings in Navigation & Viewport Keybindings.

Headless Batch Execution

./build/headless_exporter --validate-benchmarks
./build/headless_exporter --scenario scenarios/kerr_accretion_disk.yaml --output-dir ./output --width 3840 --height 2160

Command-line options are documented in Headless Batch Exporter, declarative scenario definitions in Declarative Scenario Definition, and validation targets in Verification Criteria & Benchmark Protocols.

Cluster Worker Daemon Execution

# Start an autonomous worker listening on LAN (auto-discovered by running masters)
./build/cluster_worker --auth-token "a8f5c2d3e9b14708215649fbcde71024385960abcedf1234567890abcdef1234" --backend auto

# Start an outbound worker targeting a remote master host (cloud instance / Colab)
./build/cluster_worker --master-address 198.51.100.24:42425 --auth-token "a8f5c2d3e9b14708215649fbcde71024385960abcedf1234567890abcdef1234" --no-listen --no-discovery

Worker options, Slurm HPC submission scripts, and configuration schemas are documented in Cluster Compute Worker and Cluster Configuration File.


Third-Party Assets and Image Licenses

Sky and panorama assets:

Earth and planetary assets:


License

This project is licensed under the MIT License. See LICENSE for details.

About

Deterministic, computing and raytracing engine for General Relativity, Post-Newtonian celestial mechanics, relativistic hydrodynamics, and polarized radiative transfer across curved spacetimes.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages