.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples_gallery/advanced_pdes/heterogeneous_bcs.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_gallery_advanced_pdes_heterogeneous_bcs.py: Heterogeneous boundary conditions ================================= This example implements a `spatially coupled SIR model `_ with the following dynamics for the density of susceptible, infected, and recovered individuals: .. math:: \partial_t s &= D \nabla^2 s - \beta is \\ \partial_t i &= D \nabla^2 i + \beta is - \gamma i \\ \partial_t r &= D \nabla^2 r + \gamma i Here, :math:`D` is the diffusivity, :math:`\beta` the infection rate, and :math:`\gamma` the recovery rate. .. GENERATED FROM PYTHON SOURCE LINES 19-39 .. image-sg:: /examples_gallery/advanced_pdes/images/sphx_glr_heterogeneous_bcs_001.png :alt: heterogeneous bcs :srcset: /examples_gallery/advanced_pdes/images/sphx_glr_heterogeneous_bcs_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none 0%| | 0/10.0 [00:00` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: heterogeneous_bcs.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: heterogeneous_bcs.zip `