Pigreads: The Python-integrated GPU-enabled reaction-diffusion solver using OpenCL for cardiac electrophysiology and other applications
Computer Physics Communications, vol. 323, pp. 110088
Abstract
• GPU-accelerated reaction-diffusion solver in up to three dimensions. • Minimal NumPy-friendly API with OpenCL kernels. • Includes commonly used reaction terms for cardiac electrophysiology. • Open-source, tested, documented, with examples and tutorials. Pigreads is a streamlined Python module for efficient numerical solution of reaction-diffusion systems on graphics cards (GPU), with CPU fallback. It exposes a simple and straight-forward NumPy-compatible API. Users may employ built-in models – including electrophysiology examples – or supply custom reaction terms. Supported features include 0D-3D uniform Cartesian grids, no-flux and periodic boundary conditions, anisotropic diffusion, spatially varying diffusion and reaction, and localised source terms. The project is open-source, tested, documented, and distributed with examples and tutorials. PROGRAM SUMMARY Program Title: Pigreads CPC Library link to program files: https://doi.org/10.17632/5k8jjx74hc.1 Developer’s repository link: https://gitlab.com/pigreads/pigreads Licensing provisions: MIT Programming language: Python, OpenCL Nature of problem: Reaction-diffusion systems model phenomena across physics, chemistry and biology; their numerical solution can be computationally demanding and research codes are often ad-hoc and poorly documented. Solution method: The implementation uses finite-differences spatial discretisation and explicit forward-Euler time stepping. Performance-critical kernels run in OpenCL and are called from Python using PyOpenCL; data are represented with NumPy arrays. Additional comments including restrictions and unusual features: Pigreads targets reaction-diffusion problems with a focus on cardiac electrophysiology applications and emphasises simplicity and reproducibility over advanced numerical complexity. We adhere to best practices in scientific software development, including version control, testing, and continuous integration.
Authors 3
-
Leiden University · Leiden University Medical Center
Affiliation as printed
Laboratory of Experimental Cardiology, Leiden University Medical Center (LUMC), Albinusdreef 2, Leiden, 2333 ZA, The Netherlands
Mathematical Institute, Leiden University, Einsteinweg 55, Leiden, 2333 CC, The Netherlands
-
Leiden University · Leiden University Medical Center
Affiliation as printed
Laboratory of Experimental Cardiology, Leiden University Medical Center (LUMC), Albinusdreef 2, Leiden, 2333 ZA, The Netherlands
Mathematical Institute, Leiden University, Einsteinweg 55, Leiden, 2333 CC, The Netherlands
-
Leiden University · Leiden University Medical Center
Affiliation as printed
Laboratory of Experimental Cardiology, Leiden University Medical Center (LUMC), Albinusdreef 2, Leiden, 2333 ZA, The Netherlands
Mathematical Institute, Leiden University, Einsteinweg 55, Leiden, 2333 CC, The Netherlands
Cited by 1 stored of 1
1 result