Technical overview
------------------

.. figure:: fig/scheme.png
   :alt: Schematic diagram of the main components of Pigreads.

Pigreads organises simulation components around three objects: an
instance of the class ``Models`` that defines local reaction terms, an
array ``inhom`` that defines the domain and which model to use where,
and an array ``states`` holding all state variables on a uniform
Cartesian grid, see also the above figure.

Numerical choices are deliberately simple: finite-difference stencils
for spatial derivatives and explicit forward-Euler time stepping.
Supported capabilities include 0D-3D grids, no-flux and periodic
boundary conditions, spatially varying anisotropic diffusivity and
reaction terms, and source terms.

Diffusion and reaction kernels run in OpenCL on the selected GPU/CPU
device; Python performs setup, parameter changes, and in- and output
while results remain accessible as NumPy arrays for analysis and
plotting, for instance using Matplotlib or
PyVista.
