This repository contains the Sibernetic simulator along with Python
bindings and tests. The code base mixes C++ (in src/ and inc/), OpenCL
kernels and a number of helper Python scripts.
src/– main C++ sources and OpenCL kernels (sphFluid.cl).inc/– C++ headers with physics constants, solver classes and helpers.configuration/– example configuration files for the simulator.buffers/– output data (created at runtime).tests/– Python tests;run_all_tests.shwrapssibernetic_c302.pyfor automated runs.- Python utilities such as
main_sim.py,sibernetic_c302.pyandplot_positions.pycan drive the simulator or analyse its output.
Before building you should install dependencies via ./setup.sh.
To compile the C++ code use make. A convenience script test.sh
runs code formatting, static checks via ruff, builds the simulator
and executes the test suite:
./test.shtest.sh in turn calls run_all_tests.sh which performs multiple
runs of sibernetic_c302.py and verifies the produced output files.
For Apple Silicon GPU simulation, build the native Metal substrate
separately via cd src/metal_diff && ./build.sh; the resulting
sib_metal binary exposes the differentiable XPBD pipeline (see
README.md "Differentiable physics with native Metal").
- Keep C++ headers and sources under
inc/andsrc/respectively. - OpenCL kernels reside in
src/*.cl. - When adding Python scripts ensure they pass
ruff formatandruff check. - Test additions should be placed under
tests/and runnable viatest.sh.