Python software and reproducible numerical examples for the paper On the Accuracy of Gradient Random Walk Methods for the Heat, FitzHugh–Nagumo, and Burgers' Equations by Stephen Abkin and Prabir Daripa (arXiv:2608.22592).
The repository supports two uses:
- reproduce the reported tables and figures, and
- modify the supplied configurations or study scripts to run new cases.
For the archived version 1.0.0 release, download and extract the ZIP from Zenodo, then open a terminal in the extracted directory:
cd Gradient-Random-Walk-Solvers-1.0.0Alternatively, clone the development repository:
git clone https://github.com/stephen122204/Gradient-Random-Walk-Solvers.git
cd Gradient-Random-Walk-Solvers
git checkout grw-solvers-v3Create a Python 3.11 environment:
python -m venv .venvActivate it on macOS or Linux:
source .venv/bin/activateOn Windows PowerShell, use:
.\.venv\Scripts\Activate.ps1On Windows Command Prompt, use:
.venv\Scripts\activate.batThen install the pinned dependencies on any platform:
python -m pip install --upgrade pip
python -m pip install -r requirements.txtThe pinned environment uses Python 3.11.4. Generated files are written under
output/ or outputs/. Both directories are ignored by Git.
Confirm the environment works before the longer runs (takes a few seconds):
python -m unittest discover -s testsGenerate the ten figures used in the paper directly from the committed data:
python reproduce.py paperRe-run the representative single-seed studies or all ensemble and controlled studies:
python reproduce.py studies
python reproduce.py ensemblesThe individual ensemble targets are t4 (heat), t7 (paired heat-grid
control), t5 (FitzHugh–Nagumo), t3 (Cole–Hopf plateau controls), and
t8 (controlled Burgers attribution). For example:
python reproduce.py t8The committed reference values can be checked with:
python reproduce.py verify
python reproduce.py verify-ensemblesUse python reproduce.py verify --deep to re-run the archived representative
simulations as well as the tabulated studies. One command covers everything,
the deep representative checks followed by a full re-run and comparison of the
five ensemble studies:
python reproduce.py verify-allMeasured wall-clock times (Apple-Silicon laptop, pinned environment):
| Command | What it covers | Wall clock |
|---|---|---|
python reproduce.py paper |
the paper's ten figures, from committed data | ~6 s |
python reproduce.py verify --deep |
single-seed studies plus archived representative arrays (179 checks) | ~17 s |
python reproduce.py t3 |
Cole–Hopf plateau controls | ~2 s |
python reproduce.py t8 |
controlled Burgers attribution | ~4 s |
python reproduce.py t5 |
FitzHugh–Nagumo thirty-seed ensemble | ~15 s |
python reproduce.py t4 |
heat thirty-seed ensemble | ~1.5 min |
python reproduce.py t7 |
paired heat output-grid study | ~1.5 min |
python reproduce.py verify-all |
release gate: deep checks plus all five ensemble studies, re-run and compared | ~4 min |
Allow longer on older hardware.
Run python reproduce.py with no target to display every available command.
Copy a JSON file from configs/, change its parameters, and pass it to the
solver:
python main.py configs/heat_step_dirichlet.json
python main.py configs/fhn_grw_steady.json
python main.py configs/burgers_stationary_shock.jsonconfig_template.jsonc documents the available fields. Custom comparison
figures are saved below outputs/. When an exact solution is available, a
modified case can also be checked with:
python verify_solver.py --equation heat --config configs/heat_step_dirichlet.jsonThe files in studies/ are complete examples of parameter sweeps, multi-seed
experiments, error decompositions, bootstrap intervals, and controlled
comparisons. They can be copied and edited for new studies.
simulation.py,config.py: solver and configuration handling.configs/,config_template.jsonc: editable example inputs.studies/,study_paper_refinement.py: paper experiments and reusable study examples.reproduce.py: paper reproduction and verification entry point.figure_data/,pinned_ensembles/,expected_values.json: committed data behind the reported values and figures.figure_scripts/: figure generation.tests/: quick installation checks of core formulas and boundary operations.
Please cite the paper:
S. Abkin and P. Daripa, On the Accuracy of Gradient Random Walk Methods for the Heat, FitzHugh–Nagumo, and Burgers' Equations, arXiv preprint arXiv:2608.22592, 2026.
Version 1.0.0 of this software is archived on Zenodo:
https://doi.org/10.5281/zenodo.22050659.
See CITATION.cff for complete citation metadata.
The authors thank Oliver Stalker for providing an early version of the Python code.
Principal Investigator: Professor Prabir Daripa — Texas A&M University, Department of Mathematics
Other projects from the Daripa Research Group are available on the group's GitHub page.