Mathematical problem definition
-------------------------------

We generally define reaction-diffusion systems as:

.. math::

   \partial_t \underline{u}(t, \symbfit x)
   =
   \underbrace{
       \underline{P} \nabla \cdot \symbfit D(\symbfit x) \nabla \underline{u}(t, \symbfit x)
   }_{\text{diffusion}}
   +
   \underbrace{
       \underline{r}(\underline{u}, \symbfit x)
   }_{\text{reaction}}
   +
   \underbrace{
       \underline{s}(t, \symbfit x)
   }_{\text{source}}

for time :math:`t\in[0, T]` and space
:math:`\symbfit x = [x, y, z]^{\text{T}} \in\heartsuit\subset\mathbb R^3`
in the domain :math:`\heartsuit`, with initial conditions
:math:`\underline{u}(0, \symbfit x)` and no-flux boundary conditions
:math:`0 = \symbfit{n}\cdot \symbfit D \nabla u` for diffused variables on
:math:`\symbfit x \in \partial\heartsuit`. At each point in time and space,
the states vector
:math:`\underline{u}(t, \symbfit x) \in \mathbb R^{\mathtt{Nv}}` consists of
``Nv`` elements, the so-called states or variables, :math:`u_0`,
:math:`u_1`, …, :math:`u_{\mathtt{Nv}-1}`. For the diffusion term, we
define the diffusivity matrix :math:`\symbfit D(\symbfit x) \in
\mathbb R^{3\times 3}` and the selection matrix
:math:`\underline{P} \in \mathbb
R^{\mathtt{Nv}\times\mathtt{Nv}}` to select which variables to diffuse
and how strongly. The selection matrix often takes the sparse form
:math:`\underline{P} =
\operatorname{diag}(P_{0}, ..., P_{\mathtt{Nv}-1})` with mostly zeros.
The reaction term
:math:`\underline{r}(\underline{u}, \symbfit x) \in \mathbb R^{\mathtt{Nv}}`
describes the local dynamics of the system and may vary in space, for
instance in parameters or even in the model equations themselves. We
refer to a specific local choice of
:math:`\underline{r}_{\mathtt{imodel}}(\underline u)` with fixed parameters as
a model; :math:`\underline{r}` refers to the reaction term, i.e., all
models. The source term
:math:`\underline{s}(t, \symbfit x) \in \mathbb R^{\mathtt{Nv}}` can be used to
add external influences to the system, for instance to stimulate the
system at specific times and locations.

For no source term, :math:`\underline s = 0`, homogeneous and isotropic
diffusion, :math:`\symbfit D(\symbfit x) = D = \text{const.}`, and only two
variables, :math:`u = u_0` and :math:`v = u_1`, with only :math:`u`
diffusing, :math:`P_0 = 1`, :math:`P_1 = 0`, the system reduces to:

.. math::

   \partial_t u(t, \symbfit x)
   &=
   D \nabla^2 u(t, \symbfit x) + r_u(u, v)
   \\
   \partial_t v(t, \symbfit x)
   &=
   r_v(u, v)
