Skip to content

Latest commit

 

History

History
42 lines (34 loc) · 1.65 KB

File metadata and controls

42 lines (34 loc) · 1.65 KB

Repository Guide

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.

Layout

  • 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.sh wraps sibernetic_c302.py for automated runs.
  • Python utilities such as main_sim.py, sibernetic_c302.py and plot_positions.py can drive the simulator or analyse its output.

Building and Testing

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.sh

test.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").

Contributing Notes

  • Keep C++ headers and sources under inc/ and src/ respectively.
  • OpenCL kernels reside in src/*.cl.
  • When adding Python scripts ensure they pass ruff format and ruff check.
  • Test additions should be placed under tests/ and runnable via test.sh.