Skip to content

cstarkjp/DPRS

Repository files navigation

Directed Percolation in Rust and Python

In this project, we implement a variety of directed percolation 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-class, simplified Domany-Kinzel evolution for p_c ~ 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.

See here for some rough "how-to" notes on wrapping Rust with Python.

2d DP-class, simplified Domany-Kinzel t-decay of mean order parameter mean ρ(t), for p_c ~ p=0.163145, n_x=30000, n_y=30000, t=50000

Demos

Domany-Kinzel

Simplified DP-class Domany-Kinzel model simulations are demonstrated in the following Jupyter notebooks. The emphasis here is on checking the t-decay of mean ρ(t), which has well-established power-law tail-scaling behavior.

Related pure-Python demos can be found here:

About

Directed percolation and related models implemented in Rust and wrapped in Python

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors