Skip to content

DPRS PyPI package

Directed percolation-type models in Rust

In this project, we implement directed percolation (DP) and similar lattice models in Rust. The Rust code is accessed via a Python wrapper to make experimentation as convenient as possible. Jupyter notebooks are used to implement the Python-wrapped simulations.

1d DP evolution for \(p_c \approx p=0.53891\), \(n_x=300\), \(t=200\)
Figure 1: 1d DP evolution for \(p_c \approx p=0.53891\), \(n_x=300\), \(t=200\)

We have two motivations for adopting Rust: one is to ensure maximum performance; another is to achieve this in a memory-safe and bug-free fashion (which is not easy to do in C or C++).

Fast run times are achieved through parallelization using the Rayon crate. We anticipate boosting performance further with GPU-compute using wgpu.