1 Introduction

Classical SIR compartment models are cornerstone models of epidemiology which allow one to study the evolution of an infected population at a given spatial scale (e.g. whole countries, regions, counties or cities). Such models date back to the pioneer work of Kermack and McKendrick (1927) and describe the evolution of susceptible (S) and infected (I) populations which eventually become removed (R) via systems of ordinary differential equations which typically take the form

$$\begin{aligned} \left\{ \begin{aligned} S'(t)&=-\tau S(t)I(t),\\ I'(t)&=\tau S(t)I(t)-\eta I(t),\\ R'(t)&=\eta I(t), \end{aligned} \right. \end{aligned}$$
(1.1)

where \(\tau >0\) is a contact rate between susceptible and infected populations, and \(1/\eta >0\) is the average infectious period; see Hethcote (2000) for a review on SIR models. These models have been used in the past to reproduce data of epidemic outbreaks such as the bubonic plague (Kermack and McKendrick 1927), malaria (Mandal et al. 2011), SARS influenza (Centers for Disease Control and Prevention 2003; Magal et al. 2016) and most recently COVID-19 (New England Journal of Medicine 2020; Magal and Webb 2018; Liu et al. 2020); see also Stolerman et al. (2015) and Magal and Webb (2018) for other applications.

In classical SIR models such as (1.1), interactions among the infected population are oversimplified, and when taken into account they typically involve transfer matrices of populations of infected between various uniform patches (Van den Driessche and Watmough 2002; Magal et al. 2016, 2018). Our interest lies in the understanding of the intricate interplay between spatial effects and heterogeneous interactions among infected populations. Schematically, we propose a model composed of cities linked by a given transportation network (roads, railroads or rivers), see Fig. 1 for an illustration in the case of France. It will turn out that the appropriate theoretical framework will be graph theory where each vertices of the graph will be thought as the cities and the edges the lines of transportation. In a first approximation, we will assume that infected populations are only subject to spatial diffusion along the lines, as it is traditionally assumed in classical spatial SIR models (Aronson 1977; Diekmann 1978; Reluga 2004; Berestycki et al. 2020). As a consequence, in our model, the dynamics of the epidemic only takes place in the cities. Interactions are then modeled by flux exchanges between cities and lines where we assume that some fraction of infected individuals can either leave a city to be on a line, or leave a line and stop in a city, or pass from one line to another through a city. The typical question that we address here can easily be stated as follows. Given a connected graph of cities linked by roads and an initial configuration of infected individuals, how does the epidemic spread into the network and what is the eventual final configuration of the infected population? Our aim here is to gain insight into this spreading aspect at the fundamental mathematical level of a SIR type model that incorporates the possibility of infected individuals to travel along a specific given transportation network.

Fig. 1
figure 1

Map of France with an illustration of a connected graph connecting major cities

Our framework is at the crossroad of models that take into account lines of transportation such as recent reaction-diffusion models that study propagation of epidemics along lines with fast diffusion (Berestycki et al. 2020) and models that incorporate networks with more sophisticated interactions dynamics (Britton et al. 2008; Sahneh et al. 2013; Spricer and Britton 2019; Ball and Britton 2020; Bonnasse-Gahot et al. 2018). On a formal level, our proposed model can be thought of as being a one-dimensional version of the planar reaction-diffusion system of Berestycki et al. (2020) with a line of fast diffusion in the case of one city and one line of transportation. Actually, the graph structure of the transportation network provides a natural embedding into a planar spatial domain. From a mathematical point of view, our model shares also some similarities with the PDE-ODE model of David et al. (2020) which studies the spread of airborne diseases where the movement of pathogens in the air is assumed to follow a linear diffusion. Actually, one-dimensional PDE-ODE models have been successfully used in other biological contexts, and we refer to the line of works (Gou and Ward 2016; Gou et al. 2015; Paquin-Lefebvre et al. 2020) on cell-bulk models of cell signaling. Although these models share some similarities, the long time dynamics are different. In Gou and Ward (2016), Gou et al. (2015) and Paquin-Lefebvre et al. (2020), one typically observes oscillatory dynamics caused by the coupling at the boundary via the loss of stability of steady-states through Hopf bifurcations, whereas the long time behavior of the solutions of our model presents the characteristics of SIR compartment models with the convergence to a steady-state of the system. As it will be demonstrated, the selected steady-state is entirely determined by the initial configuration of individuals in our network.

Finally, we highlight that there is an intrinsic difference between the PDE-ODE model that we propose and the compartment models on fixed graphs that are prominent in the literature on the subject, see for example (Britton et al. 2008; Sahneh et al. 2013; Stolerman et al. 2015; Spricer and Britton 2019; Ball and Britton 2020; Bonnasse-Gahot et al. 2018) and references therein. In our setting, connections between vertices are not instantaneous as infected individuals have to diffuse along edges in order to be transported from one vertex to another. As a consequence, our PDE-ODE model intrinsically incorporates very subtle nonlocal in time behaviors that typical compartment models on fixed graph with local interactions do not take into account.

2 Model formulation and main results

Throughout, we denote by \({\mathcal {G}}=({\mathcal {V}},{\mathcal {E}})\) a compact metric graph, i.e. a collection of vertices \({\mathcal {V}}\) and edges \({\mathcal {E}}\) and further assume that \({\mathcal {G}}\) is finite and connected. Each edge \(e\in {\mathcal {E}}\) is identified with a segment \(\Omega _e=[0,\ell _e]\) with \(\ell _e\in (0,\infty )\), where \(\ell _e\) is the finite length of the edge. A real valued function \(u:{\mathcal {G}}\longrightarrow {\mathbb {R}}\) is a collection of one dimensional maps defined for each edge \(e\in {\mathcal {E}}\):

$$\begin{aligned} u_e:\Omega _e\longrightarrow {\mathbb {R}}. \end{aligned}$$

For future references, we define \(BC({\mathcal {G}},{\mathbb {R}})\) the space of bounded continuous functions on \({\mathcal {G}}\) as

$$\begin{aligned} BC({\mathcal {G}},{\mathbb {R}}):=\underset{e\in {\mathcal {E}}}{\bigoplus }~BC(\Omega _e,{\mathbb {R}}), \end{aligned}$$

and similarly \(BC^k({\mathcal {G}},{\mathbb {R}})\) with \(k\ge 1\). We define the \(L^\infty \) norm on \({\mathcal {G}}\) for \(u \in BC({\mathcal {G}},{\mathbb {R}})\) as

$$\begin{aligned} \Vert u\Vert _\infty :=\max _{e\in {\mathcal {E}}} \sup _{x\in \Omega _e} |u_e(x)|. \end{aligned}$$

2.1 A SIR model on compact connected graph

Given a graph \({\mathcal {G}}\), we let \(X_v(t):=(S_v(t),I_v(t),R_v(t))\in {\mathbb {R}}^3\), for each \(v\in {\mathcal {V}}\), where \(S_v(t)\) represents the population of susceptible individuals, \(I_v(t)\) the population of infected individuals and \(R_v(t)\) the population of removed individuals at vertex \(v\in {\mathcal {V}}\) and time \(t>0\). We assume that \(X_v\) evolves according to a SIR model of the form

$$\begin{aligned} \left\{ \begin{aligned} S'_v(t)&=-\tau _v S_v(t)I_v(t),\\ I_v'(t)&=\tau _v S_v(t)I_v(t)-\eta _v I_v(t)+\sum _{e\sim v} \alpha ^v_e u_e(t,v)-{\overline{\lambda }}_vI_v(t),\\ R_v'(t)&=\eta _v I_v(t), \end{aligned} \right. \end{aligned}$$
(2.1)

where \(\tau _v,\eta _v>0\) are the intrinsic parameters of the epidemic which may depend on the vertex v. The contribution \(-{\overline{\lambda }}_vI_v(t)\) in the right-hand side of the equation for the infected population encodes the fact that infected individuals can leave the vertex v to incident edges whereas \(\sum _{e\sim v} \alpha ^v_e u_e(t,v)\) reflects the contribution of incoming infected individuals from incident edges. Here, \(e\sim v\) denotes the edges incident to the vertex v and

$$\begin{aligned} {\overline{\lambda }}_v:=\sum _{e\sim v}\lambda _{e}^v, \end{aligned}$$

such that \(\lambda _{e}^vI_v(t)\) infected individuals leave vertex v to edge e. We have assumed that only the infected population is subject to movement, and we think of \(S_v\) being an ambient population whose movement does not affect its distribution. We recover the standard SIR model (1.1) by considering the trivial graph \({\mathcal {G}}=(\{v\},\emptyset )\). Throughout the manuscript, we will assume the following standing hypothesis on the coefficients \(\alpha _e^v\) and \(\lambda _e^v\) in (2.1).

Hypothesis 2.1

For each \((e,v)\in {\mathcal {E}}\times {\mathcal {V}}\) we assume that

$$\begin{aligned} \alpha _e^v \in (0,1) \quad \text { and }\quad \lambda _e^v\in (0,1), \end{aligned}$$

together with

$$\begin{aligned} \sum _{e\sim v}\lambda _{e}^v \in (0,1) \quad \text { and } \quad \sum _{e\sim v}\alpha _{e}^v \in (0,1). \end{aligned}$$

Next, for each \(e\in {\mathcal {E}}\), we let \(d_e>0\) and we assume that \(u_e\) evolves according to

$$\begin{aligned} \partial _t u_e(t,x) = d_e \partial _x^2 u_e(t,x),\quad t>0, \quad x\in \overset{\circ }{\Omega }_e. \end{aligned}$$
(2.2)

Assuming that infected individuals have local diffusion along the edges of the graph is a first approximation, and this can be viewed as a limiting Brownian movement of individuals. Possible extensions could be to incorporate nonlocal diffusion or transport terms.

It now remains to model the exchanges of infected individuals at the vertices. For each \(v\in {\mathcal {V}}\), we associate an integer \(\delta _v \ge 1\) which we refer to as its degree (i.e. number of edges incident to the vertex v). We define \({\mathbf {u}}_v(t)\in {\mathbb {R}}^{\delta _v}\) as the column vector function

$$\begin{aligned} {\mathbf {u}}_v(t):=(u_e(t,v))_{e\sim v}, \end{aligned}$$

where we recall that \(e\sim v\) denotes the edges incident to the vertex v, and thus \(u_e(t,v)\) is the corresponding limit value of \(u_e\) at \(x=v\). Define also \(\partial _n {\mathbf {u}}_v(t)\in {\mathbb {R}}^{\delta _v}\) as the column vector function

$$\begin{aligned} \partial _n {\mathbf {u}}_v(t):=(\partial _n u_e(t,v))_{e\sim v}, \end{aligned}$$

where \(\partial _n u_e(t,v)\) is the outwardly normal derivative of \(u_e\) at the vertex v. Our boundary conditions at the vertex v that link (2.1) and (2.2) are described by

$$\begin{aligned} D_v \partial _n {\mathbf {u}}_v(t)+ K_v {\mathbf {u}}_v(t) = \Lambda _v {\mathbf {I}}_v(t), \end{aligned}$$
(2.3)

where \(D_v \in {\mathscr {M}}_{\delta _v}({\mathbb {R}})\) is the diagonal matrix \(D_v=\mathrm {diag}[(d_e)_{e\sim v}]\) and \(K_v \in {\mathscr {M}}_{\delta _v}({\mathbb {R}})\) whose structure will be specified below. Formally, (2.3) encodes the balance of fluxes of infected individuals at the vertex v, and we will demonstrate this heuristic rigorously by showing in the forthcoming Sect. 2.4 the conservation of total population.

2.2 Assumptions on the connectivity matrices \(K_v\)

We now precise the form of the matrix \(K_v\) entering in the boundary condition (2.3). Essentially, \(K_v\) gathers two contributions. One contribution comes from the exchanges between infected individuals at the vertex with the incoming infected individuals for the incident edges. The second contribution models exchanges between edges. Indeed we allow infected individuals to pass from one edge to another one. More precisely, we have that \(K_v\) splits into two parts

$$\begin{aligned} K_v :=A_v + N_v, \end{aligned}$$

where the matrix \(A_v \in {\mathscr {M}}_{\delta _v}({\mathbb {R}})\) is the diagonal matrix \(A_v=\mathrm {diag}(\alpha _{e}^v)_{e\sim v}\) while the matrix \(N_v \in {\mathscr {M}}_{\delta _v}({\mathbb {R}})\) is such that the sum of each column is zero. More precisely, if we label by \(e\sim v=(e_1,\ldots ,e_{\delta _v})\) the edges incident to the vertex v, we have that for all \(i=1,\ldots ,\delta _v\)

$$\begin{aligned} (N_v)_{i,i} = \sum _{j \ne i} \nu ^v_{e_i,e_j} \end{aligned}$$

and for \(i\ne j=1,\ldots ,\delta _v\)

$$\begin{aligned} (N_v)_{i,j}=-\nu ^v_{e_j,e_i}. \end{aligned}$$

In the case \(\delta _v=3\), we get

$$\begin{aligned} N_v = \left( \begin{matrix} \nu ^v_{e_1,e_2}+\nu ^v_{e_1,e_3} &{} -\nu ^v_{e_2,e_1} &{} -\nu ^v_{e_3,e_1}\\ -\nu ^v_{e_1,e_2} &{} \nu ^v_{e_2,e_1}+\nu ^v_{e_2,e_3} &{} -\nu ^v_{e_3,e_2}\\ -\nu ^v_{e_1,e_3} &{} -\nu ^v_{e_2,e_3} &{} \nu ^v_{e_3,e_1}+\nu ^v_{e_3,e_2} \end{matrix} \right) , \end{aligned}$$

see Fig. 2 for an illustration in that case.

Fig. 2
figure 2

Schematic illustration of the exchanges at a given vertex v with \(\delta _v=3\)

Furthermore, for the diagonal term we will use the shorthand notation

$$\begin{aligned} (N_v)_{e,e} = \sum _{e'\ne e} \nu ^v_{e,e'}. \end{aligned}$$

The fact that \(N_v \in {\mathscr {M}}_{\delta _v}({\mathbb {R}})\) is such that the sum of each column is zero precisely encodes the fact that there is the conservation of infected individuals through exchanges between incident edges at each vertex. And, we remark that it implies that the matrix \(K_v\) has a strict column diagonal dominance in the sense that for each \(i=1,\ldots ,\delta _v\)

$$\begin{aligned} \sum _{j=1}^{\delta _v} (K_v)_{e_j,e_i}=\alpha _{e_i}^v>0, \end{aligned}$$

because of this specific structure of \(N_v\). From now on we also assume that \(K_v\) has a diagonal dominance with respect to its lines. This property will be crucial later on in the proof of existence of solutions. As a consequence, we impose the following running assumptions on the matrices \(K_v\).

Hypothesis 2.2

For each \(v\in {\mathcal {V}}\) and \((e,e')\in {\mathcal {E}}\times {\mathcal {E}}\), we assume that

$$\begin{aligned} \nu _{e,e'}^v\in [0,1). \end{aligned}$$

Furthermore, we impose that for all \(v\in {\mathcal {V}}\)

$$\begin{aligned} \sum _{e'\ne e} \nu ^v_{e',e} < \alpha _e^v+ \sum _{e'\ne e} \nu ^v_{e,e'}, \end{aligned}$$

together with

$$\begin{aligned} (K_v)_{e,e} := \alpha _e^v+ \sum _{e'\ne e} \nu ^v_{e,e'} \in (0,1), \end{aligned}$$

for each \(e\sim v\).

Remark 2.3

If the exchanges between the edges are symmetric, that is for each \(v\in {\mathcal {V}}\) the matrices \(N_v\) are symmetric, that is

$$\begin{aligned} \nu ^v_{e,e'}= \nu ^v_{e',e}, \quad \forall (e,e')\in {\mathcal {E}}\times {\mathcal {E}}, \end{aligned}$$

then Hypothesis 2.2 is automatically satisfied.

2.3 Initial configuration

Finally, we complement our coupled PDE-ODE (2.1)–(2.2)–(2.3) with some initial conditions. We assume that at \(t=0\), we have

$$\begin{aligned} u(t=0,\cdot ) = u^0 \in BC({\mathcal {G}},{\mathbb {R}}), \end{aligned}$$

such that for \(e\in {\mathcal {E}}\),

$$\begin{aligned} u^0_e(x)\ge 0, \quad x\in \Omega _e. \end{aligned}$$

On the other hand, for the ODE system (2.1), we suppose that

$$\begin{aligned} (S_v(t=0),I_v(t=0),R_v(t=0))=(S_v^0,I_v^0,0) \ge {\mathbf {0}}, \quad \forall v\in {\mathcal {V}}. \end{aligned}$$

We further assume that (2.3) is satisfied at \(t=0\)

$$\begin{aligned} D_v \partial _n {\mathbf {u}}_v^0+ K_v {\mathbf {u}}_v^0 = \Lambda _v {\mathbf {I}}_v^0, \end{aligned}$$

with obvious notations \({\mathbf {u}}_v^0:=(u_e^0(v))_{e\sim v}\) and \({\mathbf {I}}_v^0:=( I_v^0,\ldots ,I_v^0)^{{\mathbf {t}}}\). Last, we impose that the initial total population of infected individuals is strictly positive,

$$\begin{aligned} \sum _{v\in {\mathcal {V}}} I_v^0>0, \end{aligned}$$

and that susceptible individuals are initially present at each vertex of the graph

$$\begin{aligned} S_v^0>0, \quad \forall v\in {\mathcal {V}}. \end{aligned}$$

This in turn implies that the total population is initially

$$\begin{aligned} M^0:=\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e^0(x)\mathrm {d}x+\sum _{v\in {\mathcal {V}}}\left( S_v^0+I_v^0\right) >0. \end{aligned}$$

2.4 Conservation of total population

Assuming that there is a solution to \((u,(X_v)_{v\in {\mathcal {V}}})\) to (2.1)–(2.2)–(2.3), we have that the total mass of the system M(t) defined as

$$\begin{aligned} M(t):=\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e(t,x)\mathrm {d}x+\sum _{v\in {\mathcal {V}}}\left( S_v(t)+I_v(t)+R_v(t)\right) \end{aligned}$$

is a conserved quantity and thus independent of t.

To see that, we first remark that

$$\begin{aligned} \left( S'_v(t)+I'_v(t)+R'_v(t)\right) = \sum _{e\sim v} \alpha ^v_e u_e(t,v)- {\overline{\lambda }}_vI_v(t)= \langle A_v {\mathbf {u}}_v(t) ,{\mathbf {1}}_{\delta _v}\rangle -\langle \Lambda _v {\mathbf {I}}_v(t) ,{\mathbf {1}}_{\delta _v}\rangle \end{aligned}$$

with

$$\begin{aligned} {\mathbf {1}}_{\delta _v}:=(1,\ldots ,1)^{{\mathbf {t}}}\in {\mathbb {R}}^{\delta _v}, \end{aligned}$$

and \(\langle \cdot ,\cdot \rangle \) is the standard Euclidean inner product on \({\mathbb {R}}^{\delta _v}\). On the other hand let us define

$$\begin{aligned} m(t):= \sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e(t,x)\mathrm {d}x, \end{aligned}$$

and assume that u is a classical solution of (2.2), which we will prove in the next section, and compute

$$\begin{aligned} m'(t)&=\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} \partial _t u_e(t,x)\mathrm {d}x=\sum _{e\in {\mathcal {E}}} d_e \left[ \partial _x u_e(t,x) \right] _{\partial \Omega _e} \\&=\sum _{v\in {\mathcal {V}}} \langle D_v \partial _n {\mathbf {u}}_v(t),{\mathbf {1}}_{\delta _v} \rangle \\&=\sum _{v\in {\mathcal {V}}} \langle \Lambda _v {\mathbf {I}}_v(t) - K_v {\mathbf {u}}_v(t),{\mathbf {1}}_{\delta _v} \rangle \\&=\sum _{v\in {\mathcal {V}}} \langle \Lambda _v {\mathbf {I}}_v(t) - A_v {\mathbf {u}}_v(t),{\mathbf {1}}_{\delta _v} \rangle - \underbrace{\sum _{v\in {\mathcal {V}}} \langle N_v {\mathbf {u}}_v(t),{\mathbf {1}}_{\delta _v} \rangle }_{=0}\\&=-\sum _{v\in {\mathcal {V}}}\left( S'_v(t)+I'_v(t)+R'_v(t)\right) . \end{aligned}$$

The fact that

$$\begin{aligned} \sum _{v\in {\mathcal {V}}} \langle N_v {\mathbf {u}}_v(t),{\mathbf {1}}_{\delta _v} \rangle =0 \end{aligned}$$

is a direct consequence on the specific structure of each matrix \(N_v\) and the fact that the sum of each column is zero. We therefore conclude that \(M'(t)=0\) and

$$\begin{aligned} \sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e(t,x)\mathrm {d}x+\sum _{v\in {\mathcal {V}}}\left( S_v(t)+I_v(t)+R_v(t)\right) =M^0, \quad \forall t\ge 0. \end{aligned}$$

Biological interpretation. Our model is thus consistent with the conservation of the total population as it is traditionally the case for SIR model in the case of zero natality/mortality rate. The exchanges between the vertices and the edges exactly compensate each other as is natural.

2.5 Main results and outline of the paper

We now present our main results regarding our model (2.1)–(2.2)–(2.3). At this stage of the presentation, we remain formal and refer to the following sections for precise statements and assumptions.

Main result 1: Existence and uniqueness of classical solutions. We prove in Theorem 1 below that for each well prepared initial condition our model (2.1)–(2.2)–(2.3) admits a unique positive classical solution which is global in time. We remark that the system (2.1)–(2.2)–(2.3) is not standard as it couples a system of PDEs to ODEs at each vertices through inhomogeneous Robin boundary conditions. As a consequence, the existence and uniqueness of classical solutions has to be proved. This analysis is conducted in Sect. 3.

Main result 2: Long time behavior of the solutions. We fully characterize the long time behavior of the unique solution of our model. More precisely, we prove that the final total population of infected individuals at each vertex, denoted by \({\mathcal {I}}_v^\infty \), is a well defined quantity: \(0<{\mathcal {I}}_v^\infty <\infty \) for \(v\in {\mathcal {V}}\) and \(({\mathcal {I}}_v^\infty )_{v\in {\mathcal {V}}}\) are solutions of a system of \(c_{\mathcal {V}}+1\) implicit equations, where \(c_{\mathcal {V}}\) stands for the cardinal of \({\mathcal {V}}\), which belong to the parametrized submanifold

$$\begin{aligned} \sum _{v\in {\mathcal {V}}}\left( S_v^0e^{-\tau _v {\mathcal {I}}_v^\infty }+\eta _v {\mathcal {I}}_v^\infty \right) =M^0, \end{aligned}$$

where \(M^0\) is the initial total mass. We refer to Theorem 2 for a precise statement. We also present further qualitative results on the final total configuration \(({\mathcal {I}}_v^\infty )_{v\in {\mathcal {V}}}\) in the fully symmetric case where we obtain closed form formula (see Lemma 4.4) and in the case of two vertices where we manage to obtain sharp bounds on the final total populations of infected individuals (see Lemma 4.5). In each case, we manage to relate these quantities to standard basic and effective reproductive number for classical SIR model. The aforementioned results are proved in Sect. 4.

Main result 3: Amass preserving semi-implicit numerical schemeMain result 3: Amass preserving semi-implicit numerical scheme. We propose and analyze a semi-implicit in time numerical scheme based on finite differences in space which has the property to preserve a discrete total mass associated to the discretization. We prove that if the time discretization constant is smaller than a universal constant depending only on the parameters of the system (and not on the space discretization constant) and if \(N_v\) is symmetric for each \(v\in {\mathcal {V}}\), then our mass preserving semi-implicit numerical scheme is well-posed and preserves the positivity of the solutions. We refer to Sect. 5 for a presentation of the numerical scheme and Theorem 3 for a precise statement of our main result.

Main result 4: Numerical results for various types of graphs. We illustrate our theoretical findings with selection of numerical simulations for various types of graphs in Sect. 6. We respectively study the case of 2 vertices and 1 edge, 3 vertices and 3 edges (closed graph), 4 vertices and 3 edges (star-shape graph) and \(N+1\) vertices and N edges with N being arbitrarily large (lattice graph). Most notably, in the last case, we show the propagation of the epidemics across the vertices of the graph in the form of a traveling wave.

3 The Cauchy problem: existence and uniqueness of classical solutions

This section is devoted to the proof of the following main theorem which guarantees that our model is well-posed.

Theorem 1

For each \((S_v^0,I_v^0)\ge {\mathbf {0}}\) with \(S_v^0>0\), \(\sum _{v\in {\mathcal {V}}} I_v^0>0\) and \(u^0\in BC({\mathcal {G}},{\mathbb {R}}^+)\) that satisfy the boundary condition (2.3), there exists a unique positive global solution \((S_v,I_v,R_v)\in {\mathscr {C}}^1({\mathbb {R}}^+,{\mathbb {R}}^+\times {\mathbb {R}}^+\times {\mathbb {R}}^+)\) and \(u \in {\mathscr {C}}^{1,2}({\mathbb {R}}^+_*\times {\mathcal {G}},{\mathbb {R}}^+)\).

The proof of Theorem 1 is divided into two parts. We first prove the existence of positive global classical solutions and then show that such constructed solutions are unique. We look for solutions that satisfy (2.1)–(2.2)–(2.3) in the classical sense, and we always assume that \((S_v^0,I_v^0)\ge {\mathbf {0}}\) with \(S_v^0>0\), \(\sum _{v\in {\mathcal {V}}} I_v^0>0\) and \(u^0\in BC({\mathcal {G}},{\mathbb {R}}^+)\), that is for all \(e\in {\mathcal {E}}\), \(u_e^0\ge 0\) is bounded continuous on \(\Omega _e\). We further assume that the initial conditions satisfy the boundary condition (2.3). We remark that the system (2.1)–(2.2)–(2.3) is not standard as it couples a system PDEs to ODEs at each vertices through inhomogeneous Robin boundary conditions. As a consequence, the well-posedness of the Cauchy problem has to be proved.

Remark 3.1

Our existence and uniqueness result extends trivially in the case that parameters \(\tau _v>0\), \(\alpha _e^v\in (0,1)\), \(\lambda _e^v\in (0,1)\) and \(\nu _{e,e'}^v\in [0,1)\) are continuous functions of time satisfying \(\tau _v(t)>0\), \(\alpha _e^v(t)\in (0,1)\), \(\lambda _e^v(t)\in (0,1)\) and \(\nu _{e,e'}^v(t)\in [0,1)\) together with Hypotheses 2.12.2 verified at all times \(t>0\).

3.1 Existence

In this section, we construct a classical solution to (2.1)–(2.2)–(2.3) through a limiting argument. We will obtain a solution \((u,(X_v)_{v\in {\mathcal {V}}})\) has the limit of a subsequence of solution \(((u^n,(X_v^n)_{v\in {\mathcal {V}}}))_{n\ge 0}\) of the following problems

$$\begin{aligned} \left\{ \begin{aligned} \frac{\mathrm {d}S^n_v(t)}{\mathrm {d}t}&=-\tau _v S_v^n(t)I_v^n(t),\\ \frac{\mathrm {d}I^n_v(t)}{\mathrm {d}t}&=\tau _v S_v^n(t)I_v^n(t)-(\eta _v+{\overline{\lambda }}_v) I_v^n(t)\\&\quad +\sum _{e\sim v} \alpha ^v_e u_e^{n-1}(t,v),\\ \frac{\mathrm {d}R^n_v(t)}{\mathrm {d}t}&=\eta _v I_v^n(t), \end{aligned} \right. \quad t>0, \quad \forall v\in {\mathcal {V}}, \end{aligned}$$
(3.1)

with

$$\begin{aligned} D_v \partial _n {\mathbf {u}}_v^n(t)+ K_v {\mathbf {u}}_v^n(t) = \Lambda _v {\mathbf {I}}_v^n(t), \quad t>0, \quad \forall v\in {\mathcal {V}}, \end{aligned}$$
(3.2)

and

$$\begin{aligned} \partial _t u_e^n(t,x) = d_e \partial _x^2 u_e^n(t,x), \quad t>0, \quad x\in \overset{\circ }{\Omega }_e, \quad \forall e\in {\mathcal {E}}. \end{aligned}$$
(3.3)

starting from \(u^0\in BC({\mathcal {G}},{\mathbb {R}}^+)\) and \((X^0_v)_{v\in {\mathcal {V}}}\). Note that (3.1)–(3.2)–(3.3) is supplemented by the same initial condition \((u^0,(X_v^0)_{v\in {\mathcal {V}}})\) at each step. We proceed along three main steps.

3.1.1 Step #1: solvability of (3.1)–(3.2)–(3.3)

We first show that (3.1)–(3.2)–(3.3) admits a unique solution. It can be done by induction. Assume that at step \(n-1\), we have constructed a solution \((u^{n-1},(X_v^{n-1})_{v\in {\mathcal {V}}})\) such that for each \(t\mapsto u_e^{n-1}(t,v)\) is continuous, then we get the existence of a unique solution of (3.1) which is \({\mathscr {C}}^1\) in time. Next we solve the system of PDEs (3.3)–(3.2) whose coupling comes from the boundary conditions and owing that now the right-hand side of (3.2) can be seen as given inhomogeneous term of class \({\mathscr {C}}^1\) in time. As both \(D_v\) and \(K_v\) are invertible matrices, we get the existence of a classical solution \(u^n \in {\mathscr {C}}^{1,2}\) which then ensures that \(t\mapsto u_e^{n}(t,v)\) is continuous.

Step #2: a priori estimates. Let \(0<T < 1\) be fixed. We first show by a recursive argument that \(0< S_{v}^n\), \(0\le I_{v}^n\), \(0\le R_{v}^n\) for each \(v\in {\mathcal {V}}\) and \(0\le u^n_e\) for each \(e\in {\mathcal {E}}\). It is trivial at \(n=0\). Let assume that is it true at \(n-1\). We start from (3.1) and a direct integration gives

$$\begin{aligned} S_v^n(t)&=S_v^0 e^{-\tau _v \int _0^t I_v^n(s)\mathrm {d}s}>0,\\ I_v^n(t)&=I_v^0e^{-(\eta _v+{\overline{\lambda }}_v)t+\int _0^t S_v^n(s)\mathrm {d}s}\\&\quad +\sum _{e\sim v} \alpha ^v_e \int _0^t e^{-(\eta _v+{\overline{\lambda }}_v)(t-s)+\int _s^t S_v^n(\tau )\mathrm {d}\tau } u_e^{n-1}(s,v)\mathrm {d}s \ge 0,\\ R_v^n(t)&=\eta _v \int _0^t I_v^n(s)\mathrm {d}s \ge 0. \end{aligned}$$

Now owing that \(0\le I_{v}^n\) for each \(v\in {\mathcal {V}}\), the maximum principle implies that \(u_e^n\ge 0\) for each \(e\in {\mathcal {E}}\). Assume by contradiction that \(e_*\in {\mathcal {E}}\) is the component which reaches a negative minimum, namely \(u_{e_*}^n(t_*,x_*)=-\delta <0\) with \(u_{e_*}^n(t,x)>-\delta \) for \(t<t_*\) and \(x\in \Omega _{e_*}\) and for each \(e\ne e_*\) we have \(u_e^n(t,x)>-\delta \) for \(t\le t_*\) and \(x\in \Omega _{e}\). We know that \(x_* \in \partial \Omega _{e_*}\) and let denote \(v_*=x_*\in {\mathcal {V}}\) the vertex where this occurs. The Hopf lemma implies that \(\partial _n u_{e_*}^n(t_*,v_*)<0\). Inspecting the boundary condition (3.2) at \(v_*\), we obtain that

$$\begin{aligned}&d_{e_*} \partial _n u_{e_*}^n(t_*,v_*)+\alpha _{e_*}^{v_*}u_{e_*}^n(t_*,v_*)+\left( \sum _{e\sim e_*} \nu ^{v_*}_{e_*,e} \right) u_{e_*}^n(t_*,v_*)\\&\quad - \sum _{e\sim e_*}\nu ^{v_*}_{e,e_*} u_{e}^n(t_*,v_*)=\lambda _{e_*}^{v_*}I_{v_*}^n(t), \end{aligned}$$

which writes

$$\begin{aligned}&0> d_{e_*} \partial _n u_{e_*}^n(t_*,v_*)+\delta \left( \sum _{e\sim e_*}\nu ^{v_*}_{e,e_*}-\alpha _{e_*}^{v_*}-\sum _{e\sim e_*} \nu ^{v_*}_{e_*,e}\right) \\&\quad - \sum _{e\sim e_*}\nu ^{v_*}_{e,e_*} (\delta + u_{e}^n(t_*,v_*)) = \lambda _{e_*}^{v_*}I_{v_*}^n(t) \ge 0, \end{aligned}$$

and leads to a contradiction. Here we have used the fact that

$$\begin{aligned} \sum _{e\sim e_*}\nu ^{v_*}_{e,e_*}\le \alpha _{e_*}^{v_*}+\sum _{e\sim e_*} \nu ^{v_*}_{e_*,e}, \end{aligned}$$

from Hypothesis 2.2 on the matrices \((K_v)_{v\in {\mathcal {V}}}\).

Next, from the positivity of solutions, we obtain some uniform \(L^\infty \) bounds. More precisely, we claim that there exists a constant \(K>0\) depending only on \((T,I_v^0,S_v^0,\Vert u^0\Vert _\infty )\) such that

$$\begin{aligned} 0 \le S_v^n(t), I_v^n(t), R_v^n(t) \le K, \text { and } \left| \frac{\mathrm {d}S_v^n(t)}{\mathrm {d}t}\right| , \left| \frac{\mathrm {d}I_v^n(t)}{\mathrm {d}t}\right| , \left| \frac{\mathrm {d}R_v^n(t)}{\mathrm {d}t}\right| \le K \quad 0<t\le T, \end{aligned}$$

and

$$\begin{aligned} 0\le u^n_e (t,x) \le K, \quad 0<t\le T, \quad x\in \Omega _e. \end{aligned}$$

First, using (3.1) we obtain that

$$\begin{aligned} \frac{\mathrm {d}S^n_v(t)}{\mathrm {d}t}+\frac{\mathrm {d}I^n_v(t)}{\mathrm {d}t}+\frac{\mathrm {d}R^n_v(t)}{\mathrm {d}t}=-{\overline{\lambda }}_v I_v^n(t)+\sum _{e\sim v} \alpha ^v_e u_e^{n-1}(t,v), \end{aligned}$$

which gives that

$$\begin{aligned} 0\le S_v^n(t)+I_v^n(t)+R_v^n(t) \le S_v^0+I_v^0+ T \Vert u^{n-1}\Vert _\infty , \quad 0<t\le T, \end{aligned}$$

together with

$$\begin{aligned} \left| \frac{\mathrm {d}S_v^n(t)}{\mathrm {d}t}\right| , \left| \frac{\mathrm {d}I_v^n(t)}{\mathrm {d}t}\right| , \left| \frac{\mathrm {d}R_v^n(t)}{\mathrm {d}t}\right| \le C\Vert u^{n-1}\Vert _\infty (1+ T +T^2\Vert u^{n-1}\Vert _\infty ) \quad 0<t\le T, \end{aligned}$$

which in turn implies that

$$\begin{aligned} \Vert u^{n}\Vert _\infty \le {\tilde{C}} T \Vert u^{n-1}\Vert _\infty (1+ T +T^2\Vert u^{n-1}\Vert _\infty ), \end{aligned}$$

for \(C,{\tilde{C}}>0\) only depend on the initial condition \((u^0,(X_v^0)_{v\in {\mathcal {V}}})\) and the parameters of the system. We now claim that by induction, we have for all \(0<t\le T\),

$$\begin{aligned}&\displaystyle 0\le S_v^n(t)+I_v^n(t)+R_v^n(t) \le {\hat{C}} \sum _{p=0}^{a_n}T^p, \\&\displaystyle \left| \frac{\mathrm {d}S_v^n(t)}{\mathrm {d}t}\right| , \left| \frac{\mathrm {d}I_v^n(t)}{\mathrm {d}t}\right| , \left| \frac{\mathrm {d}R_v^n(t)}{\mathrm {d}t}\right| \le {\hat{C}} \sum _{p=0}^{2 a_n}T^p,\\&\displaystyle \Vert u^{n}\Vert _\infty \le {\hat{C}} \sum _{p=0}^{2 a_n}T^{p+1}, \end{aligned}$$

with \(a_n=2+2a_{n-1}\) for \(n\ge 2\) and \(a_1=1\) for some \({\hat{C}}>0\) only depending on \((u^0,(X_v^0)_{v\in {\mathcal {V}}})\). As \(0<T<1\), we get that

$$\begin{aligned} 0\le S_v^n(t)+I_v^n(t)+R_v^n(t) \le {\hat{C}}_T, \quad 0<t\le T, \end{aligned}$$

together with

$$\begin{aligned} \Vert u^{n}\Vert _\infty , \left| \frac{\mathrm {d}S_v^n(t)}{\mathrm {d}t}\right| , \left| \frac{\mathrm {d}I_v^n(t)}{\mathrm {d}t}\right| , \left| \frac{\mathrm {d}R_v^n(t)}{\mathrm {d}t}\right| \le {\hat{C}}_T, \end{aligned}$$

for some constant \({\hat{C}}_T>0\) depending on \((T,u^0,(X_v^0)_{v\in {\mathcal {V}}})\).

Step #3: existence of a solution. Parabolic Schauder estimates give that the time derivative and the space derivatives up to order 2 of \(u^n\) are uniformly Hölder continuous in compact sets. As a consequence, we can use the Arzela–Ascoli theorem to show that \((u^n,(X_v^n)_{v\in {\mathcal {V}}})\) converges (up to sequences) toward \((u,(X_v)_{v\in {\mathcal {V}}})\) in \( {\mathcal {C}}^{1,2}_{loc}((0,T)\times {\mathcal {G}})\times {\mathcal {C}}^1_{loc}((0,T))\times {\mathcal {C}}^1_{loc}((0,T))\times {\mathcal {C}}^1_{loc}((0,T))\). Passing to the limit \(n\rightarrow +\infty \) in (3.1)–(3.2)–(3.3) we get that \((u,(X_v)_{v\in {\mathcal {V}}})\) satisfies (2.1)–(2.2) subject to boundary conditions (2.3).

As a by product of the proof we get that for the just constructed solution \((u,(X_v)_{v\in {\mathcal {V}}})\) we have the uniform bounds:

$$\begin{aligned} 0<S_v(t) \le S_v^0, \quad 0<t\le T, \quad v\in {\mathcal {V}}, \end{aligned}$$

and

$$\begin{aligned} 0\le I_v(t),R_v(t) \quad 0<t\le T, \end{aligned}$$

together with

$$\begin{aligned} 0\le u_e (t,x), \quad 0<t\le T, \quad x\in \Omega _e, \quad e\in {\mathcal {E}}. \end{aligned}$$

The fact that \(I_v(t)\ge 0\) implies thanks to the strong maximum principle that in fact

$$\begin{aligned} 0< u_e (t,x), \quad 0<t\le T, \quad x\in \Omega _e, \quad e\in {\mathcal {E}}, \end{aligned}$$

which in turn gives that \(I_v(t)>0\) for each \(v\in {\mathcal {V}}\) since

$$\begin{aligned} I_v^n(t)= & {} I_v^0e^{-(\eta _v+{\overline{\lambda }}_v)t+\int _0^t S_v^n(s)\mathrm {d}s}\\&+\sum _{e\sim v} \alpha ^v_e \int _0^t e^{-(\eta _v+{\overline{\lambda }}_v)(t-s)+\int _s^t S_v^n(\tau )\mathrm {d}\tau } u_e^{n-1}(s,v)\mathrm {d}s > 0. \end{aligned}$$

Finally, we use the conservation of mass which tells us that

$$\begin{aligned} \sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e(t,x)\mathrm {d}x+\sum _{v\in {\mathcal {V}}}\left( S_v(t)+I_v(t)+R_v(t)\right) =M^0>0, \quad 0<t\le T, \end{aligned}$$

such that both \(I_v(t)\) and \(R_v(t)\) are uniformly bounded in time, together with their derivatives. This also implies that there exists a constant \(M>0\), depending only \((u^0,(X_v^0)_{v\in {\mathcal {V}}})\) such that

$$\begin{aligned} 0< u_e(t,x)\le M, \quad 0<t\le M, \quad x\in \Omega _e. \end{aligned}$$

Using again parabolic regularity, we obtain the solution \((u,(X_v)_{v\in {\mathcal {V}}})\) is global in time and satisfies (2.1)–(2.2)–(2.3) in the classical sense.

3.2 Uniqueness

Let assume that \((u,(X_v)_{v\in {\mathcal {V}}})\) and \(({\tilde{u}},({\tilde{X}}_v)_{v\in {\mathcal {V}}})\) are two classical solutions to (2.2)–(2.3)–(2.1) starting from the same initial datum \((u^0,(X_v^0)_{v\in {\mathcal {V}}})\). We denote \(({\hat{u}},({\hat{X}}_v)_{v\in {\mathcal {V}}})\) where for each \(e\in {\mathcal {E}}\)

$$\begin{aligned} {\hat{u}}_e=u_e-{\tilde{u}}_e, \end{aligned}$$

and each \(v\in {\mathcal {V}}\)

$$\begin{aligned} {\hat{X}}_v=({\hat{S}}_v,{\hat{I}}_v,{\hat{R}}_v)=(S_v-{\tilde{S}}_v,I_v-{\tilde{I}}_v ,R_v-{\tilde{R}}_v). \end{aligned}$$

By linearity, we get that for \(e\in {\mathcal {E}}\)

$$\begin{aligned} \partial _t {\hat{u}}_e = d_e \partial _x^2 {\hat{u}}_e,\quad t>0, \quad x\in \overset{\circ }{\Omega }_e, \end{aligned}$$

together with

$$\begin{aligned} D_v \partial _n {\hat{{\mathbf {u}}}}_v(t)+ K_v {\hat{{\mathbf {u}}}}_v(t) = \Lambda _v {\hat{{\mathbf {I}}}}_v(t), \quad t>0, \quad v\in {\mathcal {V}}. \end{aligned}$$

On the other, one computes that \( {\hat{X}}_v\) satisfies for each \(v\in {\mathcal {V}}\)

$$\begin{aligned} \left\{ \begin{aligned} {\hat{S}}'_v(t)&=-\tau _v \left( S_v(t){\hat{I}}_v(t)+{\hat{S}}_v(t){\tilde{I}}_v(t)\right) ,\\ {\hat{I}}_v'(t)&=\tau _v \left( S_v(t){\hat{I}}_v(t)+{\hat{S}}_v(t){\tilde{I}}_v(t)\right) -\eta _v {\hat{I}}_v(t)+\sum _{e\sim v} \alpha ^v_e {\hat{u}}_e(t,v)-{\overline{\lambda }}_v{\hat{I}}_v(t),\\ {\hat{R}}_v'(t)&=\eta _v {\hat{I}}_v(t), \end{aligned} \right. \end{aligned}$$

We define the energy

$$\begin{aligned} {\mathscr {E}}(t):=\frac{1}{2}\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} \left( {\hat{u}}_e(t,x)\right) ^2\mathrm {d}x+\frac{1}{2}\sum _{v\in {\mathcal {V}}}\left( {\hat{S}}_v(t)^2+{\hat{I}}_v(t)^2+{\hat{R}}_v(t)^2\right) , \end{aligned}$$

and note that \({\mathscr {E}}(0)=0\) by definition. Next, differentiating \({\mathscr {E}}(t)\), we obtain

$$\begin{aligned} {\mathscr {E}}'(t)&=\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} {\hat{u}}_e(t,x)\partial _t {\hat{u}}_e(t,x) \mathrm {d}x\\&\quad +\sum _{v\in {\mathcal {V}}}\left( {\hat{S}}_v(t){\hat{S}}'_v(t)+{\hat{I}}_v(t){\hat{I}}'_v(t)+{\hat{R}}_v(t){\hat{R}}'_v(t)\right) \\&:={\mathscr {E}}_u(t)+{\mathscr {E}}_X(t). \end{aligned}$$

On the one hand, we have

$$\begin{aligned} {\mathscr {E}}_u(t)&=\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} {\hat{u}}_e(t,x)\partial _t {\hat{u}}_e(t,x) \mathrm {d}x=\sum _{e\in {\mathcal {E}}}d_e \int _{\Omega _e} {\hat{u}}_e(t,x)\partial _x^2 {\hat{u}}_e(t,x) \mathrm {d}x\\&=-\sum _{e\in {\mathcal {E}}}d_e \int _{\Omega _e} \left( \partial _x{\hat{u}}_e(t,x)\right) ^2 \mathrm {d}x+\sum _{e\in {\mathcal {E}}}d_e \left[ {\hat{u}}_e(t,x)\partial _t {\hat{u}}_e(t,x)\right] _{\partial \Omega _e}\\&\le \sum _{v\in {\mathcal {V}}} \langle D_v \partial _n {\hat{{\mathbf {u}}}}_v(t),{\hat{{\mathbf {u}}}}_v(t) \rangle \\&= \sum _{v\in {\mathcal {V}}} \langle \Lambda _v {\hat{{\mathbf {I}}}}_v(t) - K_v {\hat{{\mathbf {u}}}}_v(t),{\hat{{\mathbf {u}}}}_v(t) \rangle \\&= \sum _{v\in {\mathcal {V}}} \langle \Lambda _v {\hat{{\mathbf {I}}}}_v(t) - A_v {\hat{{\mathbf {u}}}}_v(t),{\hat{{\mathbf {u}}}}_v(t) \rangle - \sum _{v\in {\mathcal {V}}} \langle N_v {\hat{{\mathbf {u}}}}_v(t),{\hat{{\mathbf {u}}}}_v(t) \rangle \\&\le \sum _{v\in {\mathcal {V}}} \langle \Lambda _v {\hat{{\mathbf {I}}}}_v(t) - A_v {\hat{{\mathbf {u}}}}_v(t),{\hat{{\mathbf {u}}}}_v(t) \rangle , \end{aligned}$$

as \(N_v\) is symmetric positive. On the other hand, we compute

$$\begin{aligned} {\mathscr {E}}_u(t)&=\sum _{v\in {\mathcal {V}}}\left( {\hat{S}}_v(t){\hat{S}}'_v(t)+{\hat{I}}_v(t){\hat{I}}'_v(t)+{\hat{R}}_v(t){\hat{R}}'_v(t)\right) \\&= \sum _{v\in {\mathcal {V}}}\tau _v\left( S_v(t){\hat{I}}_v(t){\hat{S}}_v(t)+{\hat{S}}_v(t)^2{\tilde{I}}_v(t)+S_v(t){\hat{I}}_v(t)^2+{\hat{S}}_v(t){\tilde{I}}_v(t){\hat{I}}_v(t) \right) \\&\quad - \sum _{v\in {\mathcal {V}}}\eta _v{\hat{I}}_v(t)^2-\sum _{v\in {\mathcal {V}}} {\overline{\lambda }}_v {\hat{I}}_v(t)^2+\sum _{v\in {\mathcal {V}}} {\hat{I}}_v(t)\sum _{e\sim v} \alpha ^v_e {\hat{u}}_e(t,v)\\&\quad +\sum _{v\in {\mathcal {V}}}\eta _v{\hat{R}}_v(t) {\hat{I}}_v(t)\\&\le C{\mathscr {E}}(t)+\sum _{v\in {\mathcal {V}}} {\hat{I}}_v(t)\sum _{e\sim v} \alpha ^v_e {\hat{u}}_e(t,v), \end{aligned}$$

where \(C>0\) is some large positive constant. Next, we see that

$$\begin{aligned} \sum _{v\in {\mathcal {V}}} {\hat{I}}_v(t)\sum _{e\sim v} \alpha ^v_e {\hat{u}}_e(t,v)=\sum _{v\in {\mathcal {V}}} \langle {\hat{{\mathbf {I}}}}_v(t), A_v {\hat{{\mathbf {u}}}}_v(t)\rangle , \end{aligned}$$

such that we obtain

$$\begin{aligned} {\mathscr {E}}'(t)\le C{\mathscr {E}}(t)+\sum _{v\in {\mathcal {V}}} \langle \Lambda _v {\hat{{\mathbf {I}}}}_v(t) - A_v {\hat{{\mathbf {u}}}}_v(t),{\hat{{\mathbf {u}}}}_v(t) \rangle +\sum _{v\in {\mathcal {V}}} \langle {\hat{{\mathbf {I}}}}_v(t), A_v {\hat{{\mathbf {u}}}}_v(t)\rangle . \end{aligned}$$

Next, if we denote \(\hat{\mathbf{w}}_v(t):=\frac{1}{2}A_v^{-1/2} \left( \Lambda _v +A_v\right) {\hat{{\mathbf {I}}}}_v(t) - A_v^{1/2} {\hat{{\mathbf {u}}}}_v(t)\), we compute

$$\begin{aligned} 0\le \sum _{v\in {\mathcal {V}}} \langle \hat{\mathbf{w}}_v(t),\hat{\mathbf{w}}_v(t) \rangle&=\frac{1}{4}\sum _{v\in {\mathcal {V}}} \langle A_v^{-1} \left( \Lambda _v +A_v\right) ^2 {\hat{{\mathbf {I}}}}_v(t), {\hat{{\mathbf {I}}}}_v(t) \rangle \\&\quad -\sum _{v\in {\mathcal {V}}} \langle \left( \Lambda _v +A_v\right) {\hat{{\mathbf {I}}}}_v(t),{\hat{{\mathbf {u}}}}_v(t)\rangle \\&\quad +\sum _{v\in {\mathcal {V}}} \langle A_v {\hat{{\mathbf {u}}}}_v(t),{\hat{{\mathbf {u}}}}_v(t) \rangle \\&=\frac{1}{4}\sum _{v\in {\mathcal {V}}} \langle A_v^{-1} \left( \Lambda _v +A_v\right) ^2 {\hat{{\mathbf {I}}}}_v(t), {\hat{{\mathbf {I}}}}_v(t) \rangle \\&\quad -\sum _{v\in {\mathcal {V}}} \langle \Lambda _v {\hat{{\mathbf {I}}}}_v(t) - A_v {\hat{{\mathbf {u}}}}_v(t),{\hat{{\mathbf {u}}}}_v(t) \rangle \\&\quad -\sum _{v\in {\mathcal {V}}} \langle {\hat{{\mathbf {I}}}}_v(t), A_v {\hat{{\mathbf {u}}}}_v(t)\rangle . \end{aligned}$$

As a consequence, we get

$$\begin{aligned} {\mathscr {E}}'(t)&\le C{\mathscr {E}}(t) +\frac{1}{4}\sum _{v\in {\mathcal {V}}} \langle A_v^{-1} \left( \Lambda _v +A_v\right) ^2 {\hat{{\mathbf {I}}}}_v(t), {\hat{{\mathbf {I}}}}_v(t) \rangle - \sum _{v\in {\mathcal {V}}} \langle \hat{\mathbf{w}}_v(t),\hat{\mathbf{w}}_v(t) \rangle \\&\le {\tilde{C}}{\mathscr {E}}(t), \end{aligned}$$

for some \({\tilde{C}}>0\) and we conclude that \({\mathscr {E}}(t)=0\) for all time which then implies that \({\hat{u}}=0\) and \({\hat{X}}_v=0\).

4 Long-time behavior of the solutions

Throughout this section, we denote by \((u,(X_v)_{v\in {\mathcal {V}}})\) the unique positive bounded classical solution of the Cauchy problem (2.1)–(2.2)–(2.3) as given by Theorem 1 and which further satisfies the conservation of total population, namely

$$\begin{aligned} \sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e(t,x)\mathrm {d}x+\sum _{v\in {\mathcal {V}}}\left( S_v(t)+I_v(t)+R_v(t)\right) =M^0>0, \quad \forall t>0. \end{aligned}$$

4.1 Final total populations: general results

As \(0<S_v(t) < S_v^0\) and \(S_v(t)\) is strictly decreasing, it asymptotically converges towards a limit that we denote

$$\begin{aligned} S_v^\infty :=\underset{t\rightarrow +\infty }{\lim }S_v(t), \quad v\in {\mathcal {V}}. \end{aligned}$$

Furthermore, as \(R_v(t)\) is strictly increasing and uniformly bounded, it asymptotically converges towards a limit that is denoted

$$\begin{aligned} 0<R_v^\infty :=\underset{t\rightarrow +\infty }{\lim }R_v(t)<\infty , \quad v\in {\mathcal {V}}. \end{aligned}$$

But as for each \(t>0\)

$$\begin{aligned} R_v(t)=\eta _v \int _0^t I_v(s)\mathrm {d}s, \end{aligned}$$

this implies that

$$\begin{aligned} {\mathcal {I}}_v(t):=\int _0^tI_v(s)\mathrm {d}s \longrightarrow {\mathcal {I}}_v^\infty = \frac{R_v^\infty }{\eta _v}<\infty \text { as } t\rightarrow +\infty , \end{aligned}$$

which in turn proves that

$$\begin{aligned} I_v^\infty = \underset{t\rightarrow +\infty }{\lim }I_v(t)=0, \end{aligned}$$

pending that we prove that the limit of \(I_v(t)\) as \(t\rightarrow +\infty \) exists. To see that, we use the fact that

$$\begin{aligned} \frac{\mathrm {d}I_v(t)}{\mathrm {d}t}+\frac{\mathrm {d}S_v(t)}{\mathrm {d}t}-\frac{\eta _v+{\overline{\lambda }}_v}{\tau _v} \frac{\mathrm {d}\ln S_v(t)}{\mathrm {d}t} = \sum _{e\sim v} \alpha ^v_e u_e(t,v), \quad v\in {\mathcal {V}}, \end{aligned}$$

to obtain that

$$\begin{aligned}&I_v(t)+S_v(t)-\frac{\eta _v+{\overline{\lambda }}_v}{\tau _v} \ln S_v(t) -I_v^0-S_v^0 +\frac{\eta _v+{\overline{\lambda }}_v}{\tau _v} \ln S_v^0\nonumber \\&\quad = \sum _{e\sim v} \alpha ^v_e \int _0^tu_e(s,v)\mathrm {d}s, \quad v\in {\mathcal {V}}. \end{aligned}$$
(4.1)

We now argue that the left-hand side of the previous equation is uniformly bounded as \(S_v^\infty =S_v^0 e^{-\tau _v {\mathcal {I}}_v^\infty }>0\), which ensures that \(\int _0^tu_e(s,v)\mathrm {d}s\) has a limit as \(t\rightarrow +\infty \) by positivity of \(u_e\). This in turn implies that the limit of \(I_v(t)\) as \(t\rightarrow +\infty \) exists.

If one recall the notation m(t) for the total population on the edges then we have

$$\begin{aligned} m(t)=\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e(t,x)\mathrm {d}x, \end{aligned}$$

and it verifies

$$\begin{aligned} \sum _{v\in {\mathcal {V}}} \left( S_v(t)+I_v(t)+R_v(t)\right) +m(t)= \sum _{v\in {\mathcal {V}}} \left( S_v^0+I_v^0\right) +\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e^0(x)\mathrm {d}x. \end{aligned}$$

The above computations shows that m(t) has a limit as \(t\longrightarrow +\infty \), that we denote \(m_\infty \) and which satisfies

$$\begin{aligned} \sum _{v\in {\mathcal {V}}} \left( S_v^\infty +R_v^\infty \right) +m_\infty = \sum _{v\in {\mathcal {V}}}\left( S_v^0+I_v^0\right) +\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e^0(x)\mathrm {d}x. \end{aligned}$$
(4.2)

We shall also keep in mind that

$$\begin{aligned} S_v^\infty =S_v^0 e^{-\tau _v {\mathcal {I}}_v^\infty }=S_v^0 e^{-\frac{\tau _v}{\eta _v} R_v^\infty }, \text { or } R_v^\infty = -\frac{\eta _v}{\tau _v}\ln \frac{S_v^\infty }{S_v^0}, \quad v\in {\mathcal {V}}\end{aligned}$$

And so if we introduce the function \(\Psi _v(x):=x-\frac{\eta _v}{\tau _v}\ln x\), then the above conservation of mass can be written as

$$\begin{aligned} \sum _{v\in {\mathcal {V}}}\Psi _v(S_v^\infty )+m_\infty =\sum _{v\in {\mathcal {V}}}\left( I_v^0+\Psi _v(S_v^0)\right) +\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e^0(x)\mathrm {d}x. \end{aligned}$$

On the other, one can compute that

$$\begin{aligned} \frac{\mathrm {d}m(t) }{\mathrm {d}t}=\sum _{v\in {\mathcal {V}}}{\overline{\lambda }}_vI_v(t)-\sum _{v\in {\mathcal {V}}} \langle A_v {\mathbf {u}}_v(t),{\mathbf {1}}_{\delta _v}\rangle , \end{aligned}$$

such that

$$\begin{aligned} m(t)+\sum _{v\in {\mathcal {V}}} \int _0^t \langle A_v {\mathbf {u}}_v(s) ,{\mathbf {1}}_{\delta _v}\rangle \mathrm {d}s = \sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e^0(x)\mathrm {d}x+\sum _{v\in {\mathcal {V}}}{\overline{\lambda }}_v{\mathcal {I}}_v(t). \end{aligned}$$

Now, as m(t) and each \({\mathcal {I}}_v(t)\) are convergent we deduce that all \(\int _0^t {\mathbf {u}}_v(s)\mathrm {d}s\) are also convergent so that

$$\begin{aligned} m_\infty +\sum _{v\in {\mathcal {V}}} \int _0^\infty \langle A_v {\mathbf {u}}_v(s) ,{\mathbf {1}}_{\delta _v}\rangle \mathrm {d}s = \sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e^0(x)\mathrm {d}x+\sum _{v\in {\mathcal {V}}}{\overline{\lambda }}_v{\mathcal {I}}_v^\infty , \end{aligned}$$
(4.3)

and

$$\begin{aligned} \int _0^\infty {\mathbf {u}}_v(s)\mathrm {d}s <\infty , \quad v\in {\mathcal {V}}, \end{aligned}$$

which proves that

$$\begin{aligned} {\mathbf {u}}_v(t)\longrightarrow 0 \text { as } t\rightarrow +\infty , \quad v\in {\mathcal {V}}. \end{aligned}$$

And the boundary conditions imply that

$$\begin{aligned} \partial _n {\mathbf {u}}_v(t)\longrightarrow 0 \text { as } t\rightarrow +\infty , \quad v\in {\mathcal {V}}. \end{aligned}$$

Next, we define the sequence of functions \(u^n_e(t,x)=u_e(t+n,x)\) for each \(e\in {\mathcal {E}}\) and \(X^n_v(t)=X_v(t+n)\) for each \(v\in {\mathcal {V}}\) which are uniformly bounded such that one can extract a convergent subsequence. On the one hand we have that \(\underset{n\rightarrow \infty }{\lim }X^n_v(t)=X_v^\infty =(S_v^\infty ,0,R_v^\infty )\) and on the other if \(u^\infty _e(t,x)=\underset{n\rightarrow \infty }{\lim }u^n_e(t,x)\) it is solution of

$$\begin{aligned} \partial _t u_e^\infty (t,x) = d_e\partial _x^2 u_e^\infty (t,x), \end{aligned}$$

with the boundary conditions

$$\begin{aligned} \partial _n {\mathbf {u}}_v^\infty (t)= {\mathbf {u}}_v^\infty (t)={\mathbf {0}}_{\delta _v}, \quad v\in {\mathcal {V}}. \end{aligned}$$

This then shows that \(u_e^\infty (t,x)=0\), \(t>0\) and \(x\in \overset{\circ }{\Omega }_e\) for each \(e\in {\mathcal {E}}\). As there is unicity of the limit, we deduce that

$$\begin{aligned} \underset{t\rightarrow +\infty }{\lim }u_e(t,x)=0, \quad e\in {\mathcal {E}}. \end{aligned}$$

From which we also get that \(m_\infty =0\) and that

$$\begin{aligned} \sum _{v\in {\mathcal {V}}}\Psi _v(S_v^\infty )=\sum _{v\in {\mathcal {V}}}\left( I_v^0+\Psi _v(S_v^0)\right) +\sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e^0(x)\mathrm {d}x. \end{aligned}$$

We also get from (4.3), that

$$\begin{aligned} \sum _{v\in {\mathcal {V}}} \int _0^\infty \langle A_v {\mathbf {u}}_v(s) ,{\mathbf {1}}_{\delta _v}\rangle \mathrm {d}s = \sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e^0(x)\mathrm {d}x+\sum _{v\in {\mathcal {V}}}{\overline{\lambda }}_v{\mathcal {I}}_v^\infty . \end{aligned}$$

Finally, as a consequence of (4.1), the final total populations of infected individuals at each vertices satisfy the following scalar differential equation

$$\begin{aligned} \frac{\mathrm {d}{\mathcal {I}}_v(t)}{\mathrm {d}t}= & {} S_v^0\left( 1-e^{-\tau _v {\mathcal {I}}_v(t)}\right) -\eta _v {\mathcal {I}}_v(t)+I_v^0\nonumber \\&+\sum _{e\sim v} \alpha ^v_e \int _0^tu_e(s,v)\mathrm {d}s -{\overline{\lambda }}_v {\mathcal {I}}_v(t), \quad v\in {\mathcal {V}}. \end{aligned}$$
(4.4)

Passing to the limit as \(t\rightarrow +\infty \), we get

$$\begin{aligned} 0= S_v^0\left( 1-e^{-\tau _v {\mathcal {I}}_v^\infty }\right) -\eta _v {\mathcal {I}}_v^\infty +I_v^0 +\sum _{e\sim v} \alpha ^v_e \int _0^\infty u_e(s,v)\mathrm {d}s -{\overline{\lambda }}_v {\mathcal {I}}_v^\infty , \quad v\in {\mathcal {V}}. \end{aligned}$$

To summarize, we have proved the following result.

Theorem 2

For each \((S_v^0,I_v^0)\ge {\mathbf {0}}\) with \(S_v^0>0\), \(\sum _{v\in {\mathcal {V}}} I_v^0>0\) and \(u^0\in BC({\mathcal {G}},{\mathbb {R}}^+)\) that satisfy the boundary condition (2.3), the long time behavior of the unique corresponding solution \((u,(X_v)_{v\in {\mathcal {V}}})\) is given by

$$\begin{aligned} \underset{t\rightarrow +\infty }{\lim }u_e(t,x)=0, \quad x\in \Omega _e, \quad e\in {\mathcal {E}}, \quad \text { with }\quad \int _0^\infty u_e(s,v)\mathrm {d}s < +\infty , \quad (v,e)\in {\mathcal {G}}, \end{aligned}$$

and

$$\begin{aligned} \underset{t\rightarrow +\infty }{\lim }~(S_v(t),I_v(t),R_v(t)) =\left( S_v^0e^{-\tau _v {\mathcal {I}}_v^\infty },0,\eta _v {\mathcal {I}}_v^\infty \right) , \quad v\in {\mathcal {V}}, \end{aligned}$$
(4.5)

where the final total populations of infected individuals \(0<{\mathcal {I}}_v^\infty <\infty \) at each vertices \(v\in {\mathcal {V}}\) are solutions of the system

$$\begin{aligned} \left\{ \begin{aligned} S_v^0e^{-\tau _v {\mathcal {I}}_v^\infty }+\eta _v {\mathcal {I}}_v^\infty&=I_v^0+S_v^0+ \sum _{e\sim v} \alpha ^v_e \int _0^\infty u_e(s,v)\mathrm {d}s - {\overline{\lambda }}_v{\mathcal {I}}_v^\infty , \quad v \in {\mathcal {V}},\\ \sum _{v\in {\mathcal {V}}} \int _0^\infty \langle A_v {\mathbf {u}}_v(s) ,{\mathbf {1}}_{\delta _v}\rangle \mathrm {d}s&= \sum _{e\in {\mathcal {E}}} \int _{\Omega _e} u_e^0(x)\mathrm {d}x+\sum _{v\in {\mathcal {V}}}{\overline{\lambda }}_v{\mathcal {I}}_v^\infty . \end{aligned} \right. \nonumber \\ \end{aligned}$$
(4.6)

As a consequence, \(({\mathcal {I}}_v^\infty )_{v\in {\mathcal {V}}}\) belongs to the parametrized submanifold given by

$$\begin{aligned} \sum _{v\in {\mathcal {V}}}\left( S_v^0e^{-\tau _v {\mathcal {I}}_v^\infty }+\eta _v {\mathcal {I}}_v^\infty \right) =M^0. \end{aligned}$$
(4.7)

Remark 4.1

Equivalently, \((S_v^\infty )_{v\in {\mathcal {V}}}\) belongs to the parametrized submanifold given by

$$\begin{aligned} \sum _{v\in {\mathcal {V}}}\left( S_{v}^\infty -\frac{\eta _v}{\tau _v} \log \left( {S_{v}^\infty }\right) +\frac{\eta _v}{\tau _v} \log \left( {S_{v}^0}\right) \right) =M^0, \end{aligned}$$
(4.8)

and \((R_v^\infty )_{v\in {\mathcal {V}}}\) belongs to the parametrized submanifold given by

$$\begin{aligned} \sum _{v\in {\mathcal {V}}} \left( S^0_v\exp (-\tau _v/\eta _v\, R_v^\infty ) + R_v^\infty \right) = M^0. \end{aligned}$$
(4.9)

The equations (4.7), (4.8), and (4.9) also read \(\sum _{v\in {\mathcal {V}}}\left( S_v^\infty +R_v^\infty \right) =M^0\), which is nothing but (4.2) since we have proved that \(m_\infty =0\).

Remark 4.2

If we assume that \(\tau =\tau _v>0\) and \(\eta =\eta _v>0\) are independent of \(v\in {\mathcal {V}}\) and let \(\widetilde{S_{v}}={\tau }/{\eta }\, {S_{v}}\), \(\widetilde{R_v^\infty } = \exp (-\tau /\eta \, R_v^\infty )\) and \(\widetilde{{\mathcal {I}}_v^\infty }=\exp (-\tau {\mathcal {I}}_v^\infty ) \). Then, equations (4.7), (4.8), and (4.9) are respectively equivalent to

$$\begin{aligned} \prod _{v\in {\mathcal {V}}}\exp \left( \widetilde{S_{v}^\infty }\right) \frac{\widetilde{S_{v}^0}}{\widetilde{S_{v}^\infty }}= & {} \exp \left( \frac{\tau }{\eta }M^0\right) , \\ \prod _{v\in {\mathcal {V}}} \frac{\exp \left( \widetilde{S_v^0}\widetilde{R_v^\infty }\right) }{\widetilde{R_v^\infty }}= & {} \exp \left( \frac{\tau }{\eta }M^0\right) , \end{aligned}$$

and

$$\begin{aligned} \prod _{v\in {\mathcal {V}}}\frac{\exp \left( \widetilde{S_v^0}\widetilde{{\mathcal {I}}_v^\infty }\right) }{\widetilde{{\mathcal {I}}_v^\infty }} =\exp \left( \frac{\tau }{\eta }M^0\right) . \end{aligned}$$

The common right hand side features \(\frac{\tau }{\eta }\, M^0\) that is nothing but the traditional basic reproductive number \({\mathscr {R}}_0\).

Remark 4.3

The above equation (4.4) can be interpreted as the counter-part on graphs to equations that were already derived in a spatially continuous setting (Diekmann 1978; Berestycki et al. 2020). In our case, we can rewrite (4.4) as

$$\begin{aligned} \frac{\mathrm {d}{\mathcal {I}}_v(t)}{\mathrm {d}t}={\mathcal {L}}_v \cdot {\mathcal {I}}_v(t)+f_v({\mathcal {I}}_v(t))+I_v^0, \quad v\in {\mathcal {V}}. \end{aligned}$$

where \(f_v(x):=S_v^0\left( 1-e^{-\tau _v x}\right) -\eta _v x\) and \({\mathcal {L}}_v \cdot {\mathcal {I}}_v(t) := \sum _{e\sim v} \alpha ^v_e \int _0^tu_e(s,v)\mathrm {d}s -{\overline{\lambda }}_v {\mathcal {I}}_v(t)\). As a consequence, Eq. (4.4) can be thought as a discrete reaction-diffusion equation set on the graph \({\mathcal {G}}\) where \({\mathcal {L}}_v\) is a heterogenous diffusion process which takes into account the connectivity of the graph, while \(f_v\) encodes the nonlinear reaction terms. As in Diekmann (1978) and Berestycki et al. (2020), the nonlinearity has some concavity properties as

$$\begin{aligned} x\mapsto \frac{f_v(x)}{x} \text { is decreasing and } f_v(x)\le (S_v^0\tau _v-\eta _v) \, x \quad \forall (x,v) \in [0,\infty )\times {\mathcal {V}}. \end{aligned}$$

We do not pursue this direction as it would require a thorough study of the heterogeneous diffusion operator \({\mathcal {L}}_v\) which is beyond the scope of the present manuscript.

4.2 Final total populations of infected individuals: further properties

The aim of this section is to present further qualitative results on the final total configuration \(({\mathcal {I}}_v^\infty )_{v\in {\mathcal {V}}}\) in the fully symmetric case where one can obtain closed form formula and in the case of two vertices where we manage to obtain sharp bounds on the final total populations of infected individuals. In each case, we manage to relate these quantities to standard basic and effective reproductive number for classical SIR model (Diekmann et al. 1990). We also refer to Stolerman et al. (2015) in the case of networks without diffusion on the edges where properties of the basic reproduction number are linked to the geometry and heterogeneity of the network.

4.2.1 Fully symmetric case

We assume that the length \(\ell _e\) of every edge \(e \in {\mathcal {E}}\) is equal to a reference length \(\ell \). For every \(e\in {\mathcal {E}}\), the diffusion coefficient \(d_e\) is equal to d. We moreover suppose that for every vertex \(v\in {\mathcal {V}}\), \(S_v^0=S^0\), \(I_v^0=I^0\) and \(R_v^0=R^0\). We also assume that \(\tau =\tau _v>0\) and \(\eta =\eta _v>0\) are independent of \(v\in {\mathcal {V}}\). In the same spirit, \(\lambda _e^v=\lambda \) and \(\alpha _e^v=\alpha \) for every \(e\in {\mathcal {E}}\) and \(v\in {\mathcal {V}}\). We also assume \(\nu _{e_i,e_j}^v=\nu \) for every edges incident to the vertex v. Finally, the components \(u_e^0\) of initial condition on each edges \(e\in {\mathcal {E}}\) are supposed to be even with respect to the center of the interval \(\Omega _e=[0,\ell ]\). Thanks to all these assumptions, \({\mathcal {I}}_v^\infty \) does not depend on the vertex \(v\in {\mathcal {V}}\) and we set \({\mathcal {I}}_v^\infty ={\mathcal {I}}^\infty \). Let us recall the notation \(c_{{\mathcal {V}}}\) for the cardinal of the set \({\mathcal {V}}\). The parametrized submanifold given by (4.7) becomes

$$\begin{aligned} S^\infty +R^\infty =S^0e^{-\tau {\mathcal {I}}^\infty }+\eta {\mathcal {I}}^\infty =\widetilde{M^0}, \end{aligned}$$

where \(\widetilde{M^0}=M^0/c_{{\mathcal {V}}}\). We can transform this relation as

$$\begin{aligned} S^0e^{-\tau {\mathcal {I}}^\infty }+\frac{\eta }{\tau } \tau {\mathcal {I}}^\infty -\widetilde{M^0}=0. \end{aligned}$$
(4.10)

Let \({\mathscr {I}}=-\tau {\mathcal {I}}^\infty \). We have to solve

$$\begin{aligned} S^0 e^{{\mathscr {I}}}-\frac{\eta }{\tau }{\mathscr {I}}-\widetilde{M^0}=0. \end{aligned}$$

The solutions are given in terms of Lambert W function that is the multivalued inverse relation of the function \(f(w) = we^w\) for \(w\in {\mathbb {C}}\) (Corless et al. 1996). Let us recall how to compute the real solutions of the equation \(\alpha e^x+\beta x+\gamma =0\) for \((\alpha ,\beta ,\gamma )\in {\mathbb {R}}^*\times {\mathbb {R}}^*\times {\mathbb {R}}\). Let \(\Delta =\alpha /\beta \, \exp (-\gamma /\beta )\) be the discriminant. If \(\Delta \ge 0\) or \(\Delta =-\exp (-1)\), the solution is unique and \(x=-W_0(\Delta )-\gamma /\beta \) where \(W_0\) is the principal branch. If \(\Delta \in (-\exp (-1),0)\), there are two solutions \(x_0=-W_0(\Delta )-\gamma /\beta \) and \(x_{-1}=-W_{-1}(\Delta )-\gamma /\beta \), where \(W_{-1}\) is another branch. When \(\Delta <-\exp (-1)\), there is no solution.

In our symmetric case, the discriminant writes

$$\begin{aligned} \Delta =-\frac{S^0\tau }{\eta }\exp \left( -\frac{\widetilde{M^0}\tau }{\eta }\right) . \end{aligned}$$

Since \(\Delta <0\), there exist solutions to (4.10) if \(\Delta \ge -\exp (-1)\), which is equivalent to

$$\begin{aligned} \exp \left( \frac{\widetilde{M^0}\tau }{\eta }-1\right) \ge \frac{S^0\tau }{\eta }. \end{aligned}$$
(4.11)

We recall that when we consider the standard SIR model (meaning in the context of this paper that we consider an isolated vertex), we can define the effective reproductive number \({\mathscr {R}}_e\) and the basic reproductive number \({\mathscr {R}}_0\) respectively given by

$$\begin{aligned} {\mathscr {R}}_e:=\frac{S^0\tau }{\eta }, \quad \text {and} \quad {\mathscr {R}}_0:=\frac{{M^0}\tau }{\eta }, \end{aligned}$$
(4.12)

see Diekmann et al. (1990), Van den Driessche and Watmough (2002) and Hethcote (2000) for further properties of effective and basic reproductive numbers. If we denote \(\widetilde{{\mathscr {R}}_0}=\widetilde{M^0}\tau /\eta \), the equation (4.11) reads

$$\begin{aligned} \exp \left( \widetilde{{\mathscr {R}}_0}-1\right) \ge {\mathscr {R}}_e. \end{aligned}$$

This inequality is satisfied as long as \(S^0\le \widetilde{M^0}\), which is always true since \(M^0= \sum _{e\in {\mathcal {E}}}\int _{\Omega _e}u_e^0(x) \mathrm {d}x+c_{{\mathcal {V}}}\left( S^0+I^0\right) \ge c_{{\mathcal {V}}} S^0\). Since \(\Delta =-{\mathscr {R}}_e \exp (-\widetilde{{\mathscr {R}}_0})\), the solutions are

$$\begin{aligned} {\mathscr {I}}_{0,-1}=-W_{0,-1}\left( -{\mathscr {R}}_e \exp (-\widetilde{{\mathscr {R}}_0})\right) -\widetilde{{\mathscr {R}}_0}, \end{aligned}$$

and so

$$\begin{aligned} {\mathcal {I}}^\infty _{0,-1}=W_{0,-1}\left( -{\mathscr {R}}_e \exp (-\widetilde{{\mathscr {R}}_0})\right) /\tau +\widetilde{{\mathscr {R}}_0}/\tau . \end{aligned}$$

Both \(W_{0,-1}\left( -{\mathscr {R}}_e \exp (-\widetilde{{\mathscr {R}}_0})\right) <0\). However, we can show that \({\mathcal {I}}_0^\infty >0\) and \({\mathcal {I}}_{-1}^\infty <0\). Thus, the only possibility is

$$\begin{aligned} {\mathcal {I}}^\infty =W_{0}\left( -{\mathscr {R}}_e \exp (-\widetilde{{\mathscr {R}}_0})\right) /\tau +\widetilde{{\mathscr {R}}_0}/\tau . \end{aligned}$$

We also have access to \(S^\infty \) and \(R^\infty \) thanks to (4.5). Since \(\exp (-W_0(x))=W_0(x)/x\), we obtain

$$\begin{aligned} S^\infty =-\frac{\eta }{\tau }W_{0}\left( -{\mathscr {R}}_e\exp (-\widetilde{{\mathscr {R}}_0})\right) , \end{aligned}$$

and

$$\begin{aligned} R^\infty =\frac{\eta }{\tau } W_{0}\left( -{\mathscr {R}}_e \exp (-\widetilde{{\mathscr {R}}_0})\right) +\widetilde{M^0}. \end{aligned}$$

We can summarize these results in the following lemma.

Fig. 3
figure 3

Schematic visualisation (red star) of \({\mathcal {I}}^\infty ={\mathcal {I}}_{v_1}^\infty ={\mathcal {I}}_{v_2}^\infty \), resp. \(S^\infty =S_{v_1}^\infty =S_{v_2}^\infty \), in the \(({\mathcal {I}}_{v_1},{\mathcal {I}}_{v_2})\) plane, resp. in the \((S_{v_1},S_{v_2})\)-plane, in the fully symmetric case. The asymptotic value \({\mathcal {I}}^\infty \), resp. \(S^\infty \), lies at the intersection of the diagonal \({\mathcal {I}}_{v_1}={\mathcal {I}}_{v_2}\), resp. \(S_{v_1}=S_{v_2}\), and the implicit curve given by (4.7), resp. (4.8) (color figure online)

Lemma 4.4

(Fully symmetric case.) Assume that our model is fully symmetric, then the final total population of infected individuals as given by Theorem 2 is independent on the vertex that is \({\mathcal {I}}_v^\infty ={\mathcal {I}}^\infty \) for each \(v\in {\mathcal {V}}\), and \({\mathcal {I}}^\infty \) has the following closed form formula

$$\begin{aligned} {\mathcal {I}}^\infty =\frac{W_{0}\left( -{\mathscr {R}}_e \exp (-{\mathscr {R}}_0/c_{\mathcal {V}})\right) }{\tau }+\frac{{\mathscr {R}}_0}{c_{\mathcal {V}}\,\tau }, \end{aligned}$$

where \({\mathscr {R}}_e\) and \({\mathscr {R}}_0\) are respectively the effective and basic reproductive number defined in (4.12) and \(c_{\mathcal {V}}\) the cardinal of \({\mathcal {V}}\). See Fig. 3 for an illustration.

4.2.2 Case of two vertices

In this simple case, it is possible to build explicit formulas to deal with the implicit submanifold equations (4.7), (4.8), and (4.9). Let \({\mathscr {R}}_{0,v_k}:=M^0\, \tau _{v_k}/\eta _{v_k}\) and \({\mathscr {R}}_{e,v_k}:=S_{v_k}^0\, \tau _{v_k}/\eta _{v_k}\), \(k=1,2\) be respectively the local to vertex \(v_k\) basic and effective reproductive number. Then,

$$\begin{aligned} S_{v_1}^\infty = -\frac{\eta _{v_1}}{\tau _{v_1}}W\left( -\exp \left( -{\mathscr {R}}_{0,v_1}\right) {\mathscr {R}}_{e,v_1} \left( {\mathscr {R}}_{e,v_2}\right) ^{\frac{\tau _{v_1}\eta _{v_2}}{\tau _{v_2}\eta _{v_1}}}\frac{\exp \left( S_{v_2}^\infty \, {\tau _{v_1}}/{\eta _{v_1}}\right) }{\left( {S_{v_2}^\infty }\, {\tau _{v_2}}/{\eta _{v_2}}\right) ^{\frac{\tau _{v_1}\eta _{v_2}}{\tau _{v_2}\eta _{v_1}}}} \right) , \nonumber \\ \end{aligned}$$
(4.13)

where the Lambert W function W can be either \(W_0\) or \(W_{-1}\). Indeed, the argument of W being negative, two solutions have to be considered. We obviously also have

$$\begin{aligned} S_{v_2}^\infty = -\frac{\eta _{v_2}}{\tau _{v_2}}W\left( -\exp \left( -{\mathscr {R}}_{0,v_2}\right) {\mathscr {R}}_{e,v_2} \left( {\mathscr {R}}_{e,v_1}\right) ^{\frac{\tau _{v_2}\eta _{v_1}}{\tau _{v_1}\eta _{v_2}}}\frac{\exp \left( S_{v_1}^\infty \, {\tau _{v_2}}/{\eta _{v_2}}\right) }{\left( {S_{v_1}^\infty }\, {\tau _{v_1}}/{\eta _{v_1}}\right) ^{\frac{\tau _{v_2}\eta _{v_1}}{\tau _{v_1}\eta _{v_2}}}} \right) , \nonumber \\ \end{aligned}$$
(4.14)

Due to the definition of the domain of the Lambert W function, the argument has to be greater than \(-\exp (-1)\). So, the following inequality must be satisfied for \(S_{v_2}^\infty \) (respectively of \(S_{v_1}^\infty \))

$$\begin{aligned} \frac{-\exp \left( -{\mathscr {R}}_{0,v_1}\right) {{\mathscr {R}}_{e,v_1}}\left( {\mathscr {R}}_{e,v_2}\right) ^{\frac{\tau _{v_1}\eta _{v_2}}{\tau _{v_2}\eta _{v_1}}}}{\left( S_{v_2}^\infty \, {\tau _{v_2}}/{\eta _{v_2}}\right) ^{\frac{\tau _{v_1}\eta _{v_2}}{\tau _{v_2}\eta _{v_1}}}\exp \left( -S_{v_2}^\infty \, {\tau _{v_1}}/{\eta _{v_1}}\right) }\ge -\exp (-1). \end{aligned}$$

Solving the equality part of this inequality, we find that

$$\begin{aligned} S_{v_2}^\infty = -\frac{\eta _{v_2}}{\tau _{v_2}}W\left( -\left( {{\mathscr {R}}_{e,v_1}}\right) ^{\frac{\tau _{v_2}\eta _{v_1}}{\tau _{v_1}\eta _{v_2}}}{\mathscr {R}}_{e,v_2}\exp \left( \frac{\tau _{v_2}\eta _{v_1}}{\tau _{v_1}\eta _{v_2}}\left( 1-{\mathscr {R}}_{0,v_1}\right) \right) \right) . \end{aligned}$$

This equation has to be verified both for \(W_0\) and \(W_{-1}\). Let \(\Sigma _{0,-1}^{v_2}\) be defined by

$$\begin{aligned} \Sigma _{0,-1}^{v_2}:=-\frac{\eta _{v_2}}{\tau _{v_2}}W_{0,-1}\left( {\mathscr {A}}_{v_2}\right) , \end{aligned}$$

where

$$\begin{aligned} {\mathscr {A}}_{v_2}=\left( {{\mathscr {R}}_{e,v_1}}\right) ^{\frac{\tau _{v_2}\eta _{v_1}}{\tau _{v_1}\eta _{v_2}}}{\mathscr {R}}_{e,v_2}\exp \left( \frac{\tau _{v_2}\eta _{v_1}}{\tau _{v_1}\eta _{v_2}}\left( 1-{\mathscr {R}}_{0,v_1}\right) \right) \end{aligned}$$
(4.15)

Then, the domain of \(S_{v_1}^\infty \) as a function of \(S_{v_2}^\infty \) is

$$\begin{aligned} S_{v_2}^\infty \in \left[ \min \left( \Sigma _{-1}^{v_2},\Sigma _{0}^{v_2}\right) ,\max \left( \Sigma _{-1}^{v_2},\Sigma _{0}^{v_2}\right) \right] . \end{aligned}$$

Concerning \(S_{v_2}^\infty \) as a function of \(S_{v_1}^\infty \), we have

$$\begin{aligned} S_{v_1}^\infty \in \left[ \min \left( \Sigma _{-1}^{v_1},\Sigma _{0}^{v_1}\right) ,\max \left( \Sigma _{-1}^{v_1},\Sigma _{0}^{v_1}\right) \right] , \end{aligned}$$

with

$$\begin{aligned} \Sigma _{0,-1}^{v_1}:=-\frac{\eta _{v_1}}{\tau _{v_1}}W_{0,-1}\left( {\mathscr {A}}_{v_1}\right) , \end{aligned}$$

where

$$\begin{aligned} {\mathscr {A}}_{v_1}={{\mathscr {R}}_{e,v_1}}\left( {\mathscr {R}}_{e,v_2}\right) ^{\frac{\tau _{v_1}\eta _{v_2}}{\tau _{v_2}\eta _{v_1}}}\exp \left( \frac{\tau _{v_1}\eta _{v_2}}{\tau _{v_2}\eta _{v_1}}\left( 1-{\mathscr {R}}_{0,v_2}\right) \right) . \end{aligned}$$
(4.16)

Thus,

$$\begin{aligned} \left( S_{v_1}^\infty ,S_{v_2}^\infty \right) \in \Omega _S:= & {} \left[ \min \left( \Sigma _{-1}^{v_1},\Sigma _{0}^{v_1}\right) ,\max \left( \Sigma _{-1}^{v_1},\Sigma _{0}^{v_1}\right) \right] \\&\times \left[ \min \left( \Sigma _{-1}^{v_2},\Sigma _{0}^{v_2}\right) ,\max \left( \Sigma _{-1}^{v_2},\Sigma _{0}^{v_2}\right) \right] . \end{aligned}$$

We present on Fig. 4 (left) the functions \(W_0\) and \(W_{-1}\) defining \(S_{v_2}^\infty \) as a function of \(S_{v_1}^\infty \) and the domain \(\Omega _S\) for a given set of the parameters and initial conditions. We refer to Sect. 5 for details regarding the numerical integration of the model and Sect. 6 for further numerical results on the case of two vertices.

Actually, we can reduce the domain of validity of (4.13)–(4.14) for \(S_{v_1}^\infty \) and \(S_{v_2}^\infty \). Indeed, we know that \(S_{v_k}\), \(k=1,2\), decay with respect to time, so \(S_{v_k}^\infty <S_{v_k}\). Moreover, the sum \(S_{v_1}^\infty +S_{v_2}^\infty <M^0\). Thus, we have

$$\begin{aligned} \left( S_{v_1}^\infty ,S_{v_2}^\infty \right) \in \omega _S:= & {} [\min \left( \Sigma _{-1}^{v_1},\Sigma _{0}^{v_1}\right) ,S_{v_1}^0]\\&\times [\min \left( \Sigma _{-1}^{v_2},\Sigma _{0}^{v_2}\right) ,S_{v_2}^0]\, \cap \left\{ S_{v_1}^\infty +S_{v_2}^\infty <M^0\right\} . \end{aligned}$$

The domain \(\omega _S\) is drawn on Fig. 4 (right).

Fig. 4
figure 4

Location of \(S_{v_1}^\infty \) and \(S_{v_2}^\infty \) together with the visualisation of the domains \(\Omega _S\) (left) and \(\omega _S\) (right). The final configuration of susceptible individuals \((S_{v_1}^\infty ,S_{v_2}^\infty )\) lies on the closed curve parametrized by the two branches of the Lambert W function (blue and red curve). We note that \(\left( S_{v_1}^\infty ,S_{v_2}^\infty \right) \in \omega _S\) as indicated by the red star on the right figure. Values of the parameters are \(d=10^{-3}\), \(\lambda ^1=\lambda ^2=6/10\), \(\alpha ^1=\alpha ^2=1/8\), \(\tau _{v_1}=1\), \(\tau _{v_2}=9/10\), \(\eta _{v_1}=2/5\), \(\eta _{v_2}=2/6\), and initial conditions are set to: \(I_1^0=I_2^0=10^{-6}\), \(S_0^1=3/4-I_1^ 0\), \(S_0^2=1/4-I_1^0\) and \(u^0(x)=0\). The mass \(M^0\) is therefore equal to 1 (color figure online)

Concerning \({\mathcal {I}}_{v_1}^\infty \) and \({\mathcal {I}}_{v_2}^\infty \), we can perform the same analysis. Let

$$\begin{aligned} {\mathcal {J}}_{v_1}^\infty = -{\mathscr {R}}_{0,v_1}+\frac{\tau _{v_1}\eta _{v_2}}{\tau _{v_2}\eta _{v_1}} \left( {\mathscr {R}}_{e,v_2}\exp ^{-\tau _{v_2} {\mathcal {I}}_{v_2}^\infty } + \tau _{v_2}{\mathcal {I}}_{v_2}^\infty \right) , \end{aligned}$$

and

$$\begin{aligned} {\mathcal {J}}_{v_2}^\infty = -{\mathscr {R}}_{0,v_2}+\frac{\tau _{v_2}\eta _{v_1}}{\tau _{v_1}\eta _{v_2}} \left( {\mathscr {R}}_{e,v_1}\exp ^{-\tau _{v_1} {\mathcal {I}}_{v_1}^\infty } + \tau _{v_1}{\mathcal {I}}_{v_1}^\infty \right) . \end{aligned}$$

We obtain for \(k=1,2\),

$$\begin{aligned} {\mathcal {I}}_{v_k}^\infty =\frac{1}{\tau _{v_k}}W\left( -{\mathscr {R}}_{e,v_k}\exp \left( {\mathcal {J}}_{v_k}^\infty \right) \right) -\frac{{\mathcal {J}}_{v_k}^\infty }{\tau _{v_k}}, \end{aligned}$$

still with W equal to \(W_{-1}\) and \(W_0\). Let \(\iota ^1_{-1,0}\) and \(\iota ^2_{-1,0}\) be defined by

$$\begin{aligned} \iota _{-1,0}^{v_1}=\frac{W_{-1,0}\left( -{\mathscr {A}}_{v_1}\right) }{\tau _{v_1}}+\frac{\frac{\tau _{v_1}\eta _{v_2}}{\tau _{v_2}\eta _{v_1}}\left( {\mathscr {R}}_{0,v_2}-1-\log \left( {\mathscr {R}}_{e,v_2}\right) \right) }{\tau _{v_1}}, \end{aligned}$$
(4.17)

and

$$\begin{aligned} \iota _{-1,0}^{v_2}=\frac{W_{-1,0}\left( -{\mathscr {A}}_{v_2}\right) }{\tau _{v_2}} +\frac{\frac{\tau _{v_2}\eta _{v_1}}{\tau _{v_1}\eta _{v_2}}\left( {\mathscr {R}}_{0,v_1}-1-\log \left( {\mathscr {R}}_{e,v_1}\right) \right) }{\tau _{v_2}}, \end{aligned}$$
(4.18)

with \({\mathscr {A}}_{v_1}\) and \({\mathscr {A}}_{v_2}\) given by (4.15) and (4.16). Then,

$$\begin{aligned} ({\mathcal {I}}_{v_1}^\infty ,{\mathcal {I}}_{v_2}^\infty )\in [\min \left( \iota _{-1}^{v_1},\iota _{0}^{v_1}\right) ,\max \left( \iota _{-1}^{v_1},\iota _{0}^{v_1}\right) ]\times [\min \left( \iota _{-1}^{v_2},\iota _{0}^{v_2}\right) ,\max \left( \iota _{-1}^{v_2},\iota _{0}^{v_2}\right) ]. \end{aligned}$$

We can show that \(\min \left( \iota _{-1}^{v_k},\iota _{0}^{v_k}\right) <0\) for \(k=1,2\). So, we can reduce this domain since \({\mathcal {I}}_{v_k}^\infty >0\). So, we define the domain \(\omega _{{\mathcal {I}}}\)

$$\begin{aligned} ({\mathcal {I}}_{v_1}^\infty ,{\mathcal {I}}_{v_2}^\infty )\in \omega _{{\mathcal {I}}}:=[0,\max \left( \iota _{-1}^{v_1},\iota _{0}^{v_1}\right) ]\times [0,\max \left( \iota _{-1}^{v_2},\iota _{0}^{v_2}\right) ]. \end{aligned}$$

As a consequence, we have proved the following lemma.

Fig. 5
figure 5

Location of \({\mathcal {I}}_k^\infty \) and \(R_{v_k}^\infty \), \(k=1,2\), and visualisation of the domains \(\omega _{{\mathcal {I}}}\) (left), and domain \(\omega _R\) (right). In both cases, \(({\mathcal {I}}_1^\infty ,{\mathcal {I}}_2^\infty )\in \omega _{{\mathcal {I}}}\) and \((R_1^\infty ,R_2^\infty )\in \omega _{R}\) are represented by a red star. Values of the parameters and initial conditions are similar to Fig. 4 (color figure online)

Lemma 4.5

Case of two vertices. Assume that \(c_{\mathcal {V}}=2\) and \(c_{\mathcal {E}}=1\), where \(c_{\mathcal {E}}\) is the cardinal of \({\mathcal {E}}\). The final total population of infected individuals at each vertex \({\mathcal {I}}_{v_k}^\infty \), \(k=1,2\) can be expressed as

$$\begin{aligned} {\mathcal {I}}_{v_k}^\infty =\frac{1}{\tau _{v_k}}W\left( -{\mathscr {R}}_{e,v_k}\exp \left( {\mathcal {J}}_{v_k}^\infty \right) \right) -\frac{{\mathcal {J}}_{v_k}^\infty }{\tau _{v_k}}, \end{aligned}$$

with

$$\begin{aligned} {\mathcal {J}}_{v_k}^\infty = -{\mathscr {R}}_{0,v_k}+\frac{\tau _{v_k}\eta _{v_j}}{\tau _{v_j}\eta _{v_k}} \left( {\mathscr {R}}_{e,v_j}\exp ^{-\tau _{v_j} {\mathcal {I}}_{v_j}^\infty } + \tau _{v_j}{\mathcal {I}}_{v_j}^\infty \right) , \quad k\ne j \in \left\{ 1,2\right\} , \end{aligned}$$

where \({\mathscr {R}}_{0,v_k}:=M^0\, \tau _{v_k}/\eta _{v_k}\) and \({\mathscr {R}}_{e,v_k}:=S_{v_k}^0\, {\tau _{v_k}}/{\eta _{v_k}}\), \(k=1,2\). Furthermore, we have the sharp bound

$$\begin{aligned} ({\mathcal {I}}_{v_1}^\infty ,{\mathcal {I}}_{v_2}^\infty )\in \omega _{{\mathcal {I}}}:=[0,\max \left( \iota _{-1}^{v_1},\iota _{0}^{v_1}\right) ]\times [0,\max \left( \iota _{-1}^{v_2},\iota _{0}^{v_2}\right) ], \end{aligned}$$

with \(\iota _{-1,0}^{v_k}\), \(k=1,2\) defined in (4.17)–(4.18). See Fig. 5 for an illustration.

Remark 4.6

As the solutions \(R_{v_k}^\infty \), \(k=1,2\), are simply given by \(R_{v_k}^\infty =\eta _{v_k}{\mathcal {I}}_{v_k}^\infty \), if we let \(\rho _{-1,0}^{v_k}:=\eta \iota _{-1,0}^{v_k}\) then we have

$$\begin{aligned} (R_{v_1}^\infty ,R_{v_2}^\infty )\in \omega _{R}:=[0,\max \left( \rho _{-1}^{v_1},\rho _{0}^{v_1}\right) ]\times [0,\max \left( \rho _{-1}^{v_2},\rho _{0}^{v_2}\right) ]. \end{aligned}$$

We represent on Fig. 5 the domain \(\omega _R\).

5 A semi-implicit numerical scheme which preserves total mass

In this section, we propose a semi-implicit in time numerical scheme based on finite differences in space which has the property to preserve the discrete total mass.

5.1 Notations

For each \(e\in {\mathcal {E}}\), we denote \(\delta x_e>0\) the space discretization of each edge, and \(J_e\in {\mathbb {N}}\) the number of points of the corresponding discretization. For each \(i=1,\ldots ,J_e\), the space grid on each edge is given by \(x_i=(i-1)\delta x_e\) with \(\ell _e=(J_e-1)\delta x_e\). And we let \(\mathbf{J}:=\sum _{e\in {\mathcal {E}}} J_e \in {\mathbb {N}}\). Let \(\delta t>0\) be the time discretization and denote \(t_m=m\delta t\) for \(m\ge 0\).

For a given function \(u \in {\mathscr {C}}^{1,2}({\mathbb {R}}_+\times {\mathcal {G}},{\mathbb {R}}^+)\), its space-time discretization is given by some sequence of vectors

$$\begin{aligned} u \sim (U^m)_{m\ge 0}, \text { with } U^m=\left( U_1^m,\ldots ,U_\mathbf{J}^m\right) ^\mathbf{t} \in {\mathbb {R}}^\mathbf{J}. \end{aligned}$$

For each \(e\in {\mathcal {E}}\), there exists an integer \(j_e \in {\mathbb {N}}\) such that

$$\begin{aligned} u_e(t_m, x_i) \sim U_{j_e+i}^m, \quad i=1,\ldots ,J_e, \quad m\ge 0. \end{aligned}$$

We approximate the laplacian on each edge via finite differences. That is, for each \(e\in {\mathcal {E}}\),

$$\begin{aligned} \partial _x^2 u_e(t_m,x_i) \sim \frac{U_{j_e+i-1}^m-2U_{j_e+i}^m+U_{j_e+i+1}^m}{\delta x_e^2}, \quad i=2,\ldots ,J_e-1, \quad m\ge 1, \end{aligned}$$

where we have only considered the interior points of the discretized domain. Let us now precise how we approximate the laplacian at a given vertex \(v\in {\mathcal {V}}\) of the graph. So let \(v\in {\mathcal {V}}\) such that there are \(\delta _v\) edges incident to the vertex. We locally label \(e\sim v = (e_1,\ldots ,e_{\delta _v})\) all these incident edges. For each \(v\in {\mathcal {V}}\), we introduce the map \(\sigma _v:\left\{ e_1,\ldots ,e_{\delta _v}\right\} \rightarrow \left\{ 1,\ldots ,\mathbf{J}\right\} \) such that \(\sigma _v(e_k)\) corresponds to the global index of the grid discretization associated to the vertex v on edge \(e_k\). Finally, we denote by \(n(\sigma _v(e_k))\) the global index of the nearest neighbor on edge \(e_k\) to the vertex v. Note that either \(n(\sigma _v(e_k))=\sigma _v(e_k)-1\) or \(n(\sigma _v(e_k))=\sigma _v(e_k)+1\). To approximate the laplacian at a given vertex \(v\in {\mathcal {V}}\) on edge \(e_k\), we use the following formula

$$\begin{aligned} \partial _x^2 u_{e_k}(t_m,v) \sim \frac{U_{\sigma _v(e_k)}^{*,m}-2U_{\sigma _v(e_k)}^m+U_{n(\sigma _v(e_k))}^m}{\delta x_{e_k}^2}:={\mathcal {Z}}_{v,k}^{m}, \quad k=1,\ldots ,\delta _v, \quad m\ge 1. \end{aligned}$$

The unknown \(U_{\sigma _v(e_k)}^{*,m}\) can be expressed by discretization of the boundary condition as follows. For each \(v\in {\mathcal {V}}\) with \(e\sim v = (e_1,\ldots ,e_{\delta _v})\), we approximate the normal derivative \(\partial _n u_{e_k}(t_m,v)\) as

$$\begin{aligned} \partial _n u_{e_k}(t_m,v) \sim \frac{U_{\sigma _v(e_k)}^{*,m}-U_{n(\sigma _v(e_k))}^m}{2\delta x_{e_k}}, \quad k=1,\ldots ,\delta _v, \quad m\ge 1. \end{aligned}$$

Using (2.3), and denoting \(I_v^m\) the time approximation of \(I_v(t_m)\), we obtain the following expression for \(U_{\sigma _v(e_k)}^{*,m}\)

$$\begin{aligned} U_{\sigma _v(e_k)}^{*,m}= & {} U_{n(\sigma _v(e_k))}^m-\frac{2\delta x_{e_k}}{d_{e_k}}\left( \alpha _{e_k}^vU_{\sigma _v(e_k)}^m + \sum _{l=1}^{\delta _v} (N_v)_{kl} U_{\sigma _v(e_l)}^m\right. \\&\left. -\lambda _{e_k}^v I_v^m \right) , \quad k=1,\ldots ,\delta _v, \quad m\ge 1. \end{aligned}$$

As a consequence, we obtain that for each \(k=1,\ldots ,\delta _v\) and \(m\ge 1\)

$$\begin{aligned} {\mathcal {Z}}_{v,k}^{m}= & {} \frac{2U_{n(\sigma _v(e_k))}^m-2U_{\sigma _v(e_k)}^m}{\delta x_{e_k}^2}\\&-\frac{2}{d_{e_k}\delta x_{e_k}}\left( \alpha _{e_k}^vU_{\sigma _v(e_k)}^m + \sum _{l=1}^{\delta _v} (N_v)_{kl} U_{\sigma _v(e_l)}^m -\lambda _{e_k}^v I_v^m \right) . \end{aligned}$$

5.2 The semi-implicit numerical scheme

We introduce the following scheme for each \(m\ge 0\)

$$\begin{aligned} \left\{ \begin{aligned} U^{m+1}_{j_e+i}&=U^m_{j_e+i}+ d_e\delta t \left( \frac{U_{j_e+i-1}^{m+1}-2U_{j_e+i}^{m+1}+U_{j_e+i+1}^{m+1}}{\delta x_e^2}\right) , \quad i=2,\ldots ,J_e-1, \quad e\in {\mathcal {E}},\\ U_{\sigma _v(e_k)}^{m+1}&=U_{\sigma _v(e_k)}^m+d_{e_k}\delta t {\mathcal {Z}}_{v,k}^{m+1},\quad k=1,\ldots ,\delta _v,\quad v\in {\mathcal {V}},\\ S_v^{m+1}&=S_v^m-\delta t \tau _v S_v^{m+1}I_v^m,\\ I_v^{m+1}&=I_v^m+\delta t \left( \tau _v S_v^{m+1}I_v^m-\eta _v I_v^{m+1}\right) +\delta t \left( \sum _{k=1}^{\delta _v} \alpha ^v_{e_k} U^{m+1}_{\sigma _v(e_k)}-{\overline{\lambda }}_vI_v^{m+1}\right) ,\\ R_v^{m+1}&=R_v^m+\delta t\eta _v I_v^{m+1}, \end{aligned} \right. \end{aligned}$$
(5.1)

initialized with \(U^0\in {\mathbb {R}}^\mathbf{J}\) and some \((S_v^0,I_v^0,R_v^0)_{v\in {\mathcal {V}}}\). One can find similar semi-implicit discretization for the SIR part of the model in Sekiguchi and Emiko (2011).

5.2.1 Well-posedness and positivity

We prove that the numerical scheme defined through (5.1) is well defined and preserves positivity under some condition on \(\delta t\). Indeed, we first remark that the equation for \(S_v^{m+1}\) and \(I_v^{m+1}\) in (5.1) can be used to obtain that

$$\begin{aligned} S_v^{m+1}&=\frac{S_v^m}{1+\delta t \tau _v I_v^m},\\ I_v^{m+1}&=\frac{I_v^m+\delta t \tau _v I_v^m(S_v^m+ I_v^m)}{\left( 1+\delta t(\eta _v+{\overline{\lambda }}_v)\right) (1+\delta t \tau _v I_v^m)}+\frac{\delta t}{1+\delta t (\eta _v+{\overline{\lambda }}_v)}\sum _{l=1}^{\delta _v} \alpha ^v_{e_l} U^{m+1}_{\sigma _v(e_l)}, \end{aligned}$$

such that \({\mathcal {Z}}_{v,k}^{m+1}\) can be expressed only in terms of elements of \(U^{m+1}\) as

$$\begin{aligned} {\mathcal {Z}}_{v,k}^{m+1}&=\frac{2U_{n(\sigma _v(e_k))}^{m+1}-2U_{\sigma _v(e_k)}^{m+1}}{\delta x_{e_k}^2}\\&\quad -\frac{2}{d_{e_k}\delta x_{e_k}}\left( \alpha _{e_k}^vU_{\sigma _v(e_k)}^{m+1} + \sum _{l=1}^{\delta _v} (N_v)_{kl} U_{\sigma _v(e_l)}^{m+1} \right. \\&\quad \left. -\frac{\delta t \lambda _{e_k}^v}{1+\delta t (\eta _v+{\overline{\lambda }}_v)}\sum _{l=1}^{\delta _v} \alpha ^v_{e_l} U^{m+1}_{\sigma _v(e_l)} \right) \\&\quad +\frac{2\lambda _{e_k}^v}{d_{e_k}\delta x_{e_k}}\left( \frac{I_v^m+\delta t \tau _v I_v^m(S_v^m+ I_v^m)}{\left( 1+\delta t(\eta _v+{\overline{\lambda }}_v)\right) (1+\delta t \tau _v I_v^m)}\right) . \end{aligned}$$

As a consequence, there exists a matrix \({\mathcal {A}}\in {\mathscr {M}}_\mathbf{J}({\mathbb {R}})\) such that

$$\begin{aligned} \left( \mathrm {I}_\mathbf{J}+{\mathcal {A}}\right) U^{m+1}=U^m+{\mathcal {Y}}^{m}, \end{aligned}$$

where \({\mathcal {Y}}^{m}\in {\mathbb {R}}^\mathbf{J}\) is such that

$$\begin{aligned} {\mathcal {Y}}^{m}_j=\left\{ \begin{array}{cl} \dfrac{2\delta t\lambda _{e_k}^v}{\delta x_{e_k}}\left( \dfrac{I_v^m+\delta t \tau _v I_v^m(S_v^m+ I_v^m)}{\left( 1+\delta t(\eta _v+{\overline{\lambda }}_v)\right) (1+\delta t \tau _v I_v^m)}\right) &{}, \text { if } j=\sigma _v(e_k),\\ 0&{}, \text { otherwise}. \end{array} \right. \end{aligned}$$

Lemma 5.1

There exists a constant \(C_0>0\), which only depends on the parameters of the system, such that if \(0<\delta t <C_0\) then we have

  • \(\mathrm {I}_\mathbf{J}+{\mathcal {A}}\) is invertible;

  • if \(N_v\) is symmetric for each \(v\in {\mathcal {V}}\), then given \(V\in {\mathbb {R}}^\mathbf{J}\) with \(V\ge \mathbf{0}\), the unique solution \(U\in {\mathbb {R}}^\mathbf{J}\) of \((\mathrm {I}_\mathbf{J}+{\mathcal {A}})U=V\) also satisfies \(U\ge \mathbf{0}\).

Proof

Let \(U\in {\mathbb {R}}^\mathbf{J}\ne \mathbf{0} \) be such that \((\mathrm {I}_\mathbf{J}+{\mathcal {A}})U=0\). Without loss of generality, assume that \(U_{j_0}=\max _{j=1,\ldots ,{\mathbf {J}}} U_j>0\). If there exists \(e\in {\mathcal {E}}\) such that \(j_0=j_e+i_0\) for some \(i_0\in \left\{ 2,\ldots ,J_e-1\right\} \), then we have

$$\begin{aligned} U_{j_0}+\frac{d_e \delta t}{\delta x_e^2}(2U_{j_0}-U_{j_0-1}-U_{j_0+1})=0, \end{aligned}$$

which is a contradiction by definition of \(U_{j_0}\). Next if \(j_0\) is such that there is \(v\in {\mathcal {V}}\) and \(k\in \{1,\ldots ,\delta _v\}\) such that \(j_0=\sigma _v(e_k)\), then we have

$$\begin{aligned}&U_{\sigma _v(e_k)}+\frac{2d_{e_k}\delta t}{\delta x_{e_k}^2}(U_{\sigma _v(e_k)}-U_{n(\sigma _v(e_k))})\\&\quad =-\frac{2\delta t}{\delta x_{e_k}}\left( \alpha _{e_k}^vU_{\sigma _v(e_k)} + \sum _{l=1}^{\delta _v} (N_v)_{kl} U_{\sigma _v(e_l)} -\frac{\delta t \lambda _{e_k}^v}{1+\delta t (\eta _v+{\overline{\lambda }}_v)}\sum _{l=1}^{\delta _v} \alpha ^v_{e_l} U_{\sigma _v(e_l)} \right) . \end{aligned}$$

The left-hand side of the above equality is strictly positive and we claim that the right-hand side is negative. We use the fact that \((N_v)_{kl}=-\nu ^v_{e_l,e_k}\) when \(k\ne l\) and \((N_v)_{kk}=\sum _{j\ne k}\nu ^v_{e_k,e_j}\)

$$\begin{aligned} \sum _{l=1}^{\delta _v} (N_v)_{kl} U_{\sigma _v(e_l)}&=\left( \sum _{j\ne k}\nu ^v_{e_k,e_j}\right) U_{\sigma _v(e_k)}-\sum _{l\ne k} \nu ^v_{e_l,e_k} U_{\sigma _v(e_l)}\\&=\left[ \sum _{j\ne k}\nu ^v_{e_k,e_j} - \sum _{l\ne k} \nu ^v_{e_l,e_k} \right] U_{\sigma _v(e_k)}\\&\quad +\sum _{l\ne k} \nu ^v_{e_l,e_k}\left( U_{\sigma _v(e_k)}- U_{\sigma _v(e_l)}\right) . \end{aligned}$$

As a consequence, we deduce that

$$\begin{aligned} {\mathcal {U}}_k^v&:=\alpha _{e_k}^vU_{\sigma _v(e_k)} + \sum _{l=1}^{\delta _v} (N_v)_{kl} U_{\sigma _v(e_l)} -\frac{\delta t \lambda _{e_k}^v}{1+\delta t (\eta _v+{\overline{\lambda }}_v)}\sum _{l=1}^{\delta _v} \alpha ^v_{e_l} U_{\sigma _v(e_l)}\\&=\left[ \alpha _{e_k}^v+\sum _{j\ne k}\nu ^v_{e_k,e_j} - \sum _{l\ne k} \nu ^v_{e_l,e_k} -\frac{\delta t \lambda _{e_k}^v}{1+\delta t(\eta _v+ {\overline{\lambda }}_v)}\sum _{l=1}^{\delta _v} \alpha ^v_{e_l} \right] U_{\sigma _v(e_k)}\\&\quad +\sum _{l\ne k} \nu ^v_{e_l,e_k}\left( U_{\sigma _v(e_k)}- U_{\sigma _v(e_l)}\right) \\&\quad +\frac{\delta t \lambda _{e_k}^v}{1+\delta t(\eta _v+ {\overline{\lambda }}_v)}\sum _{l=1}^{\delta _v} \alpha ^v_{e_l}\left( U_{\sigma _v(e_k)}- U_{\sigma _v(e_l)}\right) . \end{aligned}$$

The last two terms are positive by definition of \(U_{j_0}=U_{\sigma _v(e_k)}=\max _{j=1,\ldots ,{\mathbf {J}}} U_j>0\). Now using Hypothesis 2.2, we have that

$$\begin{aligned} \alpha _{e_k}^v+\sum _{j\ne k}\nu ^v_{e_k,e_j} - \sum _{l\ne k} \nu ^v_{e_l,e_k}>0, \end{aligned}$$

such that the term in bracket is positive provided that

$$\begin{aligned} \frac{\delta t \lambda _{e_k}^v}{1+\delta t(\eta _v+ {\overline{\lambda }}_v)}\sum _{l=1}^{\delta _v} \alpha ^v_{e_l}<\alpha _{e_k}^v+\sum _{j\ne k}\nu ^v_{e_k,e_j} - \sum _{l\ne k} \nu ^v_{e_l,e_k}, \end{aligned}$$

or equivalently

$$\begin{aligned}&\delta t \left[ \lambda _{e_k}^v\sum _{l=1}^{\delta _v} \alpha ^v_{e_l}-(\eta _v+{\overline{\lambda }}_v) \left( \alpha _{e_k}^v+\sum _{j\ne k}\nu ^v_{e_k,e_j} - \sum _{l\ne k} \nu ^v_{e_l,e_k} \right) \right] \\&\quad <\alpha _{e_k}^v+\sum _{j\ne k}\nu ^v_{e_k,e_j} - \sum _{l\ne k} \nu ^v_{e_l,e_k}. \end{aligned}$$

As a consequence, we impose that

$$\begin{aligned} 0<\delta t < \underset{v\in {\mathcal {V}}}{\min }~ \underset{k=1,\ldots ,\delta _v}{\min } \frac{\alpha _{e_k}^v+\sum _{j\ne k}\nu ^v_{e_k,e_j} - \sum _{l\ne k} \nu ^v_{e_l,e_k}}{\left[ \lambda _{e_k}^v\sum _{l=1}^{\delta _v} \alpha ^v_{e_l}-(\eta _v+{\overline{\lambda }}_v) \left( \alpha _{e_k}^v+\sum _{j\ne k}\nu ^v_{e_k,e_j} - \sum _{l\ne k} \nu ^v_{e_l,e_k} \right) \right] _+}, \end{aligned}$$

where it is understood that when the positive part is zero there is no condition on \(\delta t\). And we have reached a contradiction since

$$\begin{aligned} 0< U_{\sigma _v(e_k)}+\frac{2d_{e_k}\delta t}{\delta x_{e_k}^2}(U_{\sigma _v(e_k)}-U_{n(\sigma _v(e_k))})=-\frac{2\delta t}{\delta x_{e_k}}{\mathcal {U}}_k^v<0. \end{aligned}$$

This shows that \(\mathrm {I}_\mathbf{J}+{\mathcal {A}}\) is invertible.

Next let \(U\in {\mathbb {R}}^\mathbf{J}\) be the unique solution of \((\mathrm {I}_\mathbf{J}+{\mathcal {A}})U=V\) with \(V\ge \mathbf{0}\). We denote by \(U^- \in {\mathbb {R}}^\mathbf{J}\) the vector with components given by

$$\begin{aligned} U^-_j = \min (0,U_j), \quad j=1,\ldots ,\mathbf{J}. \end{aligned}$$

Our aim is to evaluate \(\langle (\mathrm {I}_\mathbf{J}+{\mathcal {A}})U, U^-\rangle _\mathbf{J}\) where \(\langle \cdot ,\cdot \rangle _\mathbf{J}\) is the following scalar product on \({\mathbb {R}}^\mathbf{J}\):

$$\begin{aligned} \langle U,V \rangle _\mathbf{J}:=\sum _{e\in {\mathcal {E}}} \left( \sum _{i=2}^{J_e-1} U_{j_e+i}V_{j_e+i}\right) +\frac{1}{2}\sum _{v\in {\mathcal {V}}} \left( \sum _{k=1}^{\delta _v}U_{\sigma _v(e_k)}V_{\sigma _v(e_k)}\right) . \end{aligned}$$

We divide \(\langle (\mathrm {I}_\mathbf{J}+{\mathcal {A}})U, U^-\rangle _\mathbf{J}\) into three parts:

$$\begin{aligned} \langle (\mathrm {I}_\mathbf{J}+{\mathcal {A}})U, U^-\rangle _\mathbf{J} = {\mathcal {Q}}_1+{\mathcal {Q}}_2+{\mathcal {Q}}_3, \end{aligned}$$

where

$$\begin{aligned} {\mathcal {Q}}_1&:=\sum _{e\in {\mathcal {E}}} \sum _{i=2}^{J_e-1} \left( U_{j_e+i}+\frac{d_e \delta t}{\delta x_e^2}\left( 2U_{j_e+i}-U_{j_e+i-1}-U_{j_e+i+1}\right) \right) U^-_{j_e+i},\\ {\mathcal {Q}}_2&:=\frac{1}{2}\sum _{v\in {\mathcal {V}}} \sum _{k=1}^{\delta _v} \left( U_{\sigma _v(e_k)}+\frac{2d_{e_k}\delta t}{\delta x_{e_k}^2} \left( U_{\sigma _v(e_k)}-U_{n(\sigma _v(e_k))}\right) \right) U_{\sigma _v(e_k)}^-,\\ {\mathcal {Q}}_3&:=\delta t\sum _{v\in {\mathcal {V}}} \sum _{k=1}^{\delta _v} \frac{1}{\delta x_{e_k}}\left( \alpha _{e_k}^vU_{\sigma _v(e_k)} + \sum _{l=1}^{\delta _v} (N_v)_{kl} U_{\sigma _v(e_l)} \right. \\&\quad \left. -\frac{\delta t \lambda _{e_k}^v}{1+\delta t (\eta _v+{\overline{\lambda }}_v)}\sum _{l=1}^{\delta _v} \alpha ^v_{e_l} U_{\sigma _v(e_l)} \right) U_{\sigma _v(e_k)}^-. \end{aligned}$$

The first and second terms are handled as follows

$$\begin{aligned} {\mathcal {Q}}_1+{\mathcal {Q}}_2=\langle U, U^-\rangle _\mathbf{J}+\sum _{e\in {\mathcal {E}}} \frac{d_e \delta t}{\delta x_e^2}\sum _{i=1}^{J_e-1}\left( U_{j_e+i+1}-U_{j_e+i}\right) \left( U^-_{j_e+i+1}-U^-_{j_e+i}\right) \ge 0. \end{aligned}$$

For the third term \({\mathcal {Q}}_3\), if we further assume that \(N_v\) is symmetric, then the matrix \(K_v=A_v+N_v\) is symmetric positive definite, and thus for each \(v\in {\mathcal {V}}\) there exists some \(\beta _v>0\) such that

$$\begin{aligned} \sum _{k=1}^{\delta _v} \frac{1}{\delta x_{e_k}}\left( \alpha _{e_k}^vU_{\sigma _v(e_k)} + \sum _{l=1}^{\delta _v} (N_v)_{kl} U_{\sigma _v(e_l)} \right) U_{\sigma _v(e_k)}^- \ge \beta _v \sum _{k=1}^{\delta _v} \frac{1}{\delta x_{e_k}}U_{\sigma _v(e_k)} U_{\sigma _v(e_k)}^-, \end{aligned}$$

while there exists \(\omega _v>0\) such that

$$\begin{aligned} \left( \sum _{k=1}^{\delta _v} \frac{\lambda _{e_k}}{\delta x_{e_k}}U_{\sigma _v(e_k)}^-\right) \left( \sum _{l=1}^{\delta _v} \alpha ^v_{e_l} U_{\sigma _v(e_l)} \right) \le \omega _v \sum _{k=1}^{\delta _v} \frac{1}{\delta x_{e_k}}U_{\sigma _v(e_k)} U_{\sigma _v(e_k)}^-. \end{aligned}$$

And thus, we get an estimate for \({\mathcal {Q}}_3\) of the form

$$\begin{aligned} {\mathcal {Q}}_3\ge \delta t \sum _{v\in {\mathcal {V}}}\left[ \left( \beta _v-\frac{\delta t \omega _v}{1+\delta t (\eta _v+ {\overline{\lambda }}_v)}\right) \sum _{k=1}^{\delta _v} \frac{1}{\delta x_{e_k}}U_{\sigma _v(e_k)} U_{\sigma _v(e_k)}^-\right] , \end{aligned}$$

which is positive provided that \(\delta t\) is small enough. As a consequence, we have proved that

$$\begin{aligned} 0\le \langle (\mathrm {I}_\mathbf{J}+{\mathcal {A}})U, U^-\rangle _\mathbf{J} = \langle V, U^-\rangle _\mathbf{J}\le 0, \end{aligned}$$

which implies that \(U^-=\mathbf{0}\) and thus \(U\ge \mathbf{0}\). \(\square \)

The previous lemma demonstrates the well-posedness of our numerical scheme (5.1). It also ensures that if we start with positive initial conditions \(U^0\ge \mathbf{0}\) and \(S_v^0>0\), \(I_v^0\ge 0\) with \(\sum _{v\in {\mathcal {V}}}I_v^0>0\) and \(R_v^0\ge 0\), then for all \(m\ge 1\) we also have that \(U^m\ge \mathbf{0}\), \(S_v^m>0\), \(I_v^{m}\ge 0\) and \(R_v^m\ge 0\), provided \(\delta t>0\) is small enough and \(N_v\) is symmetric for each \(v\in {\mathcal {V}}\).

5.2.2 Preservation of total discrete mass

For any \(U\in {\mathbb {R}}^\mathbf{J}\), we define the following quantity

$$\begin{aligned} \mathrm {trap}_\mathbf{J}(U):=\sum _{e\in {\mathcal {E}}} \delta x_e \left( \sum _{i=2}^{J_e-1} U_{j_e+i}\right) +\frac{1}{2}\sum _{v\in {\mathcal {V}}} \delta x_{e_k} \left( \sum _{k=1}^{\delta _v}U_{\sigma _v(e_k)}\right) . \end{aligned}$$

The expression \(\mathrm {trap}_\mathbf{J}(U)\) is simply the trapezoidal rule applied to the elements of U adapted to our graph \({\mathcal {G}}\). From (5.1), we get that

$$\begin{aligned} \mathrm {trap}_\mathbf{J}(U^{m+1})= & {} \mathrm {trap}_\mathbf{J}(U^m)+\delta t \sum _{e\in {\mathcal {E}}} \frac{d_e}{\delta x_e} \left( \sum _{i=2}^{J_e-1} \left( U_{j_e+i-1}^{m+1}-2U_{j_e+i}^{m+1}+U_{j_e+i+1}^{m+1}\right) \right) \\&+\frac{\delta t}{2}\sum _{v\in {\mathcal {V}}} \delta x_{e_k} d_{e_k} \left( \sum _{k=1}^{\delta _v}{\mathcal {Z}}^{m+1}_{v,k}\right) . \end{aligned}$$

Upon denoting \({\mathcal {Z}}_{v,k}^{1,m}\) the following quantity

$$\begin{aligned} {\mathcal {Z}}_{v,k}^{1,m}:=\frac{2U_{n(\sigma _v(e_k))}^m-2U_{\sigma _v(e_k)}^m}{\delta x_{e_k}^2} \end{aligned}$$

we get that

$$\begin{aligned} \frac{1}{2}\sum _{v\in {\mathcal {V}}} \delta x_{e_k} d_{e_k} \left( \sum _{k=1}^{\delta _v}{\mathcal {Z}}^{1,m+1}_{v,k}\right) =\sum _{v\in {\mathcal {V}}} \frac{ d_{e_k}}{\delta x_{e_k}} \left( \sum _{k=1}^{\delta _v}U_{n(\sigma _v(e_k))}^{m+1}-U_{\sigma _v(e_k)}^{m+1}\right) . \end{aligned}$$

Next, we observe that

$$\begin{aligned}&\sum _{e\in {\mathcal {E}}} \frac{d_e}{\delta x_e} \left( \sum _{i=2}^{J_e-1} \left( U_{j_e+i-1}^{m+1}-2U_{j_e+i}^{m+1}+U_{j_e+i+1}^{m+1}\right) \right) \\&\quad +\sum _{v\in {\mathcal {V}}} \frac{ d_{e_k}}{\delta x_{e_k}} \left( \sum _{k=1}^{\delta _v}U_{n(\sigma _v(e_k))}^{m+1}-U_{\sigma _v(e_k)}^{m+1}\right) =0, \end{aligned}$$

where the cancellation comes from the specific structure of the discretized laplacian through finite differences. As a consequence, we have that

$$\begin{aligned} \mathrm {trap}_\mathbf{J}(U^{m+1})= & {} \mathrm {trap}_\mathbf{J}(U^m)\\&-\delta t \sum _{v\in {\mathcal {V}}} \sum _{k=1}^{\delta _v}\left( \alpha _{e_k}^vU_{\sigma _v(e_k)}^{m+1} + \sum _{l=1}^{\delta _v} (N_v)_{kl} U_{\sigma _v(e_l)}^{m+1} -\lambda _{e_k}^v I_v^{m+1} \right) . \end{aligned}$$

We also have that

$$\begin{aligned} \sum _{k=1}^{\delta _v} \sum _{l=1}^{\delta _v} (N_v)_{kl} U_{\sigma _v(e_l)}^{m+1} = \sum _{l=1}^{\delta _v} \left( \sum _{k=1}^{\delta _v} (N_v)_{kl} \right) U_{\sigma _v(e_l)}^{m+1}=0, \end{aligned}$$

as the sum over the lines of \(N_v\) vanishes. And thus we get

$$\begin{aligned} \mathrm {trap}_\mathbf{J}(U^{m+1})=\mathrm {trap}_\mathbf{J}(U^m)-\delta t \sum _{v\in {\mathcal {V}}} \left( \sum _{k=1}^{\delta _v}\alpha _{e_k}^vU_{\sigma _v(e_k)}^{m+1} -{\overline{\lambda }}_v I_v^{m+1} \right) . \end{aligned}$$

On the other hand, from (5.1) we also have

$$\begin{aligned} \sum _{v\in {\mathcal {V}}}\left( S_v^{m+1}+I_v^{m+1}+R_v^{m+1}\right)= & {} \sum _{v\in {\mathcal {V}}}\left( S_v^{m}+I_v^{m}+R_v^{m}\right) \\&+\delta t \sum _{v\in {\mathcal {V}}} \left( \sum _{k=1}^{\delta _v}\alpha _{e_k}^vU_{\sigma _v(e_k)}^{m+1} -{\overline{\lambda }}_v I_v^{m+1} \right) . \end{aligned}$$

As a conclusion, we have proved the following result.

Lemma 5.2

Let \((U^m,S^m_v,I^m_v,R^m_v)\) a solution of (5.1), then we have for each \(m\ge 0\)

$$\begin{aligned} \mathrm {trap}_\mathbf{J}(U^{m+1})+\sum _{v\in {\mathcal {V}}}\left( S_v^{m+1}+I_v^{m+1}+R_v^{m+1}\right) =\mathrm {trap}_\mathbf{J}(U^m)+\sum _{v\in {\mathcal {V}}}\left( S_v^{m}+I_v^{m}+R_v^{m}\right) . \end{aligned}$$

This is the discrete conter part of conservation of mass for the continuous model.

Now, combining Lemmas 5.15.2, we have proved the following theorem.

Theorem 3

There exists a constant \(C_0>0\), which only depends on the parameters of the system, such that if \(0<\delta t <C_0\), then the numerical scheme (5.1) defines a unique sequence \((U^m,S^m_v,I^m_v,R^m_v)_{m\ge 0}\). If we further assume that \(N_v\) is symmetric for each \(v\in {\mathcal {V}}\), then the numerical scheme (5.1) preserves the positivity of the initial condition. Finally, for each solution of (5.1), the total discrete mass is preserved, namely for each \(m\ge 0\), we have

$$\begin{aligned}&\mathrm {trap}_\mathbf{J}(U^{m+1})+\sum _{v\in {\mathcal {V}}}\left( S_v^{m+1}+I_v^{m+1}+R_v^{m+1}\right) \\&\quad =\mathrm {trap}_\mathbf{J}(U^m)+\sum _{v\in {\mathcal {V}}}\left( S_v^{m}+I_v^{m}+R_v^{m}\right) . \end{aligned}$$

6 Numerical results for a selection of graphs

In the present section, we illustrate our theoretical results with a collection of numerical simulations for various types of graphs. Throughout this section the time discretization is set to \(\delta t=0.01\) while the space discretization to \(\delta _{x_e}=0.01\) for each \(e\in {\mathcal {E}}\).

6.1 Case of 2 vertices and 1 edge

figure a

We first consider the case where \(c_{{\mathcal {V}}}=2\) and \(c_{{\mathcal {E}}}=1\), where \(c_{{\mathcal {E}}}\) denotes the cardinal of \({\mathcal {E}}\). In this setting, we recall that our model reads as follows

$$\begin{aligned} \partial _t u(t,x) = d \partial _x^2 u(t,x), \quad t>0, \quad x\in (0,\ell ), \end{aligned}$$

with boundary conditions

$$\begin{aligned} \left\{ \begin{aligned} -d\partial _x u(t,0)+\alpha _1 u(t,0)&=\lambda _1 I_1(t),\\ d\partial _x u(t,\ell )+\alpha _2 u(t,\ell )&=\lambda _2 I_2(t), \end{aligned} \right. \quad t>0, \end{aligned}$$

where \((S_i(t),I_i(t),R_i(t))\), for \(i=1,2\), solution of

$$\begin{aligned} \left\{ \begin{aligned} S'_i(t)&=-\tau _i S_i(t)I_i(t),\\ I_i'(t)&=\tau _i S_i(t)I_i(t)-\eta _i I_v(t)+\alpha _iu(t,v_i)-\lambda _iI_i(t),\\ R_i'(t)&=\eta _i I_i(t), \end{aligned} \right. \quad t>0, \end{aligned}$$

where \(v_1=0\) and \(v_2=\ell \). This system is complemented by some initial condition \((u^0,S_i^0,I_i^0,R_i^0)\) with \(S_i>0\), \(I_1^0+I_2^0>0\), \(R_i^0=0\) and \(u^0\ge 0\) such that the boundary condition is satisfied initially. Finally, we normalize the total mass as follows

$$\begin{aligned} M^0 = \int _0^\ell u^0(x)\mathrm {d}x +\sum _{i=1}^2\left( S_i^0+I_i^0 \right) =1. \end{aligned}$$

For the numerical simulations, we have fixed initial conditions to be of the form

$$\begin{aligned} u^0(x)=\frac{\lambda _1 I_0}{\alpha _1}\exp \left( {-\dfrac{\alpha _2x^2}{2d\ell }}\right) , x \in [0,\ell ], \end{aligned}$$

with

$$\begin{aligned} (S_1^0,I_1^0,S_2^0,I_2^0)=\left( S_0-I_0-\int _0^\ell u^0(x)\mathrm {d}x,I_0,1-S_0,0\right) , \end{aligned}$$

where \(S_0\) and \(I_0\) may vary. In Figs. 6, 7 and 8, \(S_0\) and \(I_0\) are fixed to \((S_0,I_0)=(1/2,10^{-6})\), while in Fig. 10, \(S_0\) is allowed to vary and \(I_0\) is fixed to \(I_0=10^{-6}\).

Fig. 6
figure 6

Profiles of the solutions \((S_i(t),I_i(t))\) together with the total population on the edge \(\int _0^\ell u(t,x)\mathrm {d}x\) and the total mass of the system M(t) as the parameter \(\lambda _1\) is varied from 0.05 to 0.95. All other parameters are fixed and set to \(d=\ell =1\), \(\lambda _2=1/10\), \(\alpha _1=\alpha _2=1/4\), and \(\tau _1=\tau _2=1\) with \(\eta _1=\eta _2=1/3\). For the initial condition we have \((S_0,I_0)=(1/2,10^{-6})\)

In Fig. 6, we report the profiles of the solutions \((S_i(t),I_i(t))\) together with the total population on the edge \(\int _0^\ell u(t,x)\mathrm {d}x\) and the total mass of the system M(t) as the parameter \(\lambda _1\) is varied from 0.05 to 0.95, while all other parameters are being kept fixed. We observe that the dynamics of the epidemic at the second vertex is almost independent of the parameter \(\lambda _1\) while it has a significant impact on the dynamics at the first vertex. Indeed, as \(\lambda _1\) is increased, the maximum of infected individuals \(\max _{t\ge 0} I_1(t)\) is decreased. In the last panel of the figure, we also illustrate the conservation of total population where the fluctuations around \(M^0=1\) is of order \(10^{-12}\). In the top panel of Fig. 7, we present the final total populations of infected individuals and corresponding final population of susceptible individuals as \(\lambda _1\) is varied. The blue curve is the location of \(({\mathcal {I}}_1^\infty ,{\mathcal {I}}_2^\infty )\) respectively \((S_1^\infty ,S_2^\infty )\) while the dark red circles indicate the numerically computed values. We recover the fact that \(\lambda _1\) has a more significant impact on the final total populations at the first vertex than it has at the second vertex. To get a better understanding of the intricate dynamics between the epidemic at the two vertices, we also present the relative distance \(\Delta {\mathcal {T}} := {\mathcal {T}}_2-{\mathcal {T}}_1\) between time of maximal infection \({\mathcal {T}}_j\) in each population as \(\lambda _1\) is varied. We observe that \(\Delta {\mathcal {T}}\) is not monotone in \(\lambda _1\), as it first decreases and then increases. But we also note that \(\Delta {\mathcal {T}}<0\) for \(\lambda _1\ge 0.1\) traducing the fact that the pick of the epidemic occurs at the second vertex before it does at the first vertex, although initially \(I_2^0=0\). This illustrates the effect of the diffusion of infected individuals along the edge.

Fig. 7
figure 7

Final total populations of infected individuals (left) and corresponding final population of susceptible individuals (middle) as one parameter is varied from 0.05 to 0.95 while all parameters are fixed. The blue curve is the location of \(({\mathcal {I}}_1^\infty ,{\mathcal {I}}_2^\infty )\) respectively \((S_1^\infty ,S_2^\infty )\) while the dark red circles indicate the numerically computed values. Right: relative distance \(\Delta {\mathcal {T}} := {\mathcal {T}}_2-{\mathcal {T}}_1\) between time of maximal infection \({\mathcal {T}}_j\) in each population, indicated by dark red circles, as the parameter is varied from 0.05 to 0.95. Varying parameters: \(\lambda _1\) (top panel), \(\lambda _2\) (second panel), \(\alpha _1\) (third panel) and \(\alpha _2\) (bottom panel) (color figure online)

Similarly, in Fig. 7, we report the final total populations of infected individuals and corresponding final population of susceptible individuals as \(\lambda _2\) (second panel), \(\alpha _1\) (third panel) and \(\alpha _2\) (bottom panel) are varied from 0.05 to 0.95. As expected, the final total population of infected individuals at the second vertex decreases as \(\lambda _2\) increases while at the first vertex it varies less significantly. As \(\alpha _1\) increases, the final total population of infected individuals at the first vertex increases while it decreases at the second vertex. This time the relative distance \(\Delta {\mathcal {T}} := {\mathcal {T}}_2-{\mathcal {T}}_1\) between time of maximal infection is monotonically increasing with \(\alpha _1\). We get the opposite monotonicity properties as \(\alpha _2\) is varied.

Fig. 8
figure 8

Log-plot of the relative distance \(\Delta {\mathcal {T}} = {\mathcal {T}}_2-{\mathcal {T}}_1\) between time of maximal infection \({\mathcal {T}}_j\) in each population \(I_j(t)\) as the diffusion coefficient d and the length of the edge \(\ell \) are varied while all other parameters are fixed to \(\lambda _1=\lambda _2=1/10\), \(\alpha _1=\alpha _2=1/4\), and \(\tau _1=\tau _2=1\) with \(\eta _1=\eta _2=1/3\). For the initial condition we have \((S_0,I_0)=(1/2,10^{-6})\). We note that as d becomes smaller \(\Delta {\mathcal {T}}\) rapidly increases as \(\ell \) increases

In Fig. 8, we investigate the joint effect of the diffusion coefficient d and the length of the edge \(\ell \) on the dynamics of the epidemic at the vertices. Here, we focus on the delay between time of maximal infection \({\mathcal {T}}_j\) in each infected population \(I_j(t)\). As expected, when the diffusion coefficient is really small while the length is being kept at order one, \(\Delta {\mathcal {T}}\) takes large value: \(\Delta {\mathcal {T}} \sim 10^4\) when \(d=10^{-3}\) and \(\ell =1\). Biologically, this means that when the diffusion coefficient is really small it takes more time for infected individuals from vertex one to reach the second vertex and start an epidemic. We also note that at fixed \(\ell \), \(\Delta {\mathcal {T}}\) monotonically decreases as d increases, while at fixed d, \(\Delta {\mathcal {T}}\) monotonically increases as \(\ell \) increases.

Fig. 9
figure 9

Final total populations of infected individuals (left) and corresponding final population of susceptible individuals (right) as the initial population of susceptible individuals \(I_0\) is varied from \(10^{-7}\) to \(10^{-1}\) in log-scale while \(S_0=1/2\) is fixed. The dark blue curves are the location of \(({\mathcal {I}}_1^\infty ,{\mathcal {I}}_2^\infty )\) respectively \((S_1^\infty ,S_2^\infty )\) for each value of \(S_0\), while the dark red circles indicate the numerically computed values. Each dark blue curve is a level set of the parameterized surface given by the conservation of total mass (4.7). All other parameters are fixed to \(d=\ell =1\), \(\lambda _1=\lambda _2=1/10\), \(\alpha _1=\alpha _2=1/4\), and \(\tau _1=\tau _2=1\) with \(\eta _1=\eta _2=1/3\) (color figure online)

Fig. 10
figure 10

Final total populations of infected individuals (left) and corresponding final population of susceptible individuals (right) as the initial population of susceptible individuals \(S_0\) is varied from 0.05 to 0.95 while \(I_0=10^{-6}\) is fixed. The dark blue curves are the location of \(({\mathcal {I}}_1^\infty ,{\mathcal {I}}_2^\infty )\) respectively \((S_1^\infty ,S_2^\infty )\) for each value of \(S_0\), while the dark red circles indicate the numerically computed values. Each dark blue curve is a level set of the parameterized surface given by the conservation of total mass (4.7). All other parameters are fixed to \(d=\ell =1\), \(\lambda _1=\lambda _2=1/10\), \(\alpha _1=\alpha _2=1/4\), and \(\tau _1=\tau _2=1\) with \(\eta _1=\eta _2=1/3\) (color figure online)

In Figs. 9 and 10, we vary respectively the initial population of susceptible individuals \(S_0\) and infected individuals \(I_0\). We visualize the final total populations of infected individuals and corresponding final population of susceptible individuals on the parameterized surfaces \(({\mathcal {I}}_1^\infty ,{\mathcal {I}}_2^\infty ,S_0)\) and \((S_1^\infty ,S_2^\infty ,S_0)\), respectively \(({\mathcal {I}}_1^\infty ,{\mathcal {I}}_2^\infty ,I_0)\) and \((S_1^\infty ,S_2^\infty ,I_0)\), where the level sets of the parameterized surface are given by the conservation of total mass (4.7). We note that \(({\mathcal {I}}_1^\infty ,{\mathcal {I}}_2^\infty )\) and \((S_1^\infty ,S_2^\infty )\) are almost independent of \(I_0\) when \(I_0\le 10^{-3}\) with sensible variations only occurring for larger values of \(I_0\). On the other hand, we observe that as \(S_0\) is increased the final total population of infected individuals increases at the first vertex while it decreases at the second one. The dependence of \((S_1^\infty ,S_2^\infty )\) as a function of \(S_0\) is more subtile and is presented in Fig. 11. In the same figure, we also show the location of \(\max I_j(t)\) and its amplitude. We observe a strong nonlinear dependence with respect to \(S_0\). As \(S_0\) increases, we first see that the time at which \(I_1(t)\) is maximal increases and then decreases, while \(\max I_1(t)\) is monotonically increasing. The converse is observed at the second vertex.

Fig. 11
figure 11

Locations of \(S_{1,2}^\infty \) (top) and \(\max I_{1,2}(t)\) (bottom left and right) as functions of \(S_{1,2}^0\). Values of all other parameters are similar to Fig. 10. The initial condition is of the form \((S_0,1-S_0)\) with \(S_0\in [0,1]\) and to each initial configuration is associated a color code from blue to red. The curve in the top right panel is a projection on the \((S_{1}^\infty ,S_{2}^\infty )\)-plane of the parametrized a curve from Fig. 10, right panel (color figure online)

6.2 Case of 3 vertices and 3 edges

figure b

Next, we consider the case of 3 vertices and 3 edges arranged in a triangular configuration. For the numerical simulations presented in Fig. 12, we have assumed full symmetry in the parameters that is

$$\begin{aligned}&(\ell _e,d_e)=(\ell ,d), \quad e\in {\mathcal {E}},\quad (\tau _v,\eta _v)=(\tau ,\eta ), \quad v\in {\mathcal {V}},\\&(\alpha _e^v,\lambda _e^v)=(\alpha ,\lambda ), \quad (e,v)\in {\mathcal {E}}\times {\mathcal {V}}, \quad \nu _{e,e'}^v=\nu , \quad (e,e',v)\in {\mathcal {E}}\times {\mathcal {E}}\times {\mathcal {V}}. \end{aligned}$$

Regarding the initial condition, we have chosen

$$\begin{aligned} (S^0_{1},I^0_1,S^0_2,I^0_2,S^0_3,I^0_3)=\left( S^0-I_0,I_0,S^0,0,S^0,0\right) \quad v\in {\mathcal {V}}, \end{aligned}$$

for a given \((S^0,I_0)\), while for each \(e\in {\mathcal {E}}\) we have set \(u_e^0(x)=0\) on \(\Omega _e\). Note that, we have initially a boundary layer as our initial condition does not satisfy (2.3) for small times. We remark that the final total populations of infected individuals and corresponding final population of susceptible individuals belong to a surface as provided by (4.7)–(4.8) from Theorem 2.

Fig. 12
figure 12

Final total populations of infected individuals (left) and corresponding final population of susceptible individuals (right) as \(\nu \) is varied from 0.05 to 0.95. The dark blue surfaces are the location of \(({\mathcal {I}}_1^\infty ,{\mathcal {I}}_2^\infty ,{\mathcal {I}}_3^\infty )\) respectively \((S_1^\infty ,S_2^\infty ,S_3^\infty )\) for each value of \(S_0\), while the dark red circles indicate the numerically computed values. Parameters were set to \(\ell =d=1\), \((\tau ,\eta )=(1,1/6)\), and \((\alpha ,\lambda )=(1/8,1/10)\), while the initial condition is \((S_0,I_0)=(1,10^{-6})\) (color figure online)

In Fig. 13, we tested a different configuration. Upon labeling by A the edge between vertices \(v_1\) and \(v_2\), B the edge between vertices \(v_2\) and \(v_3\) and C the edge between vertices \(v_1\) and \(v_3\), we have set the parameters to

$$\begin{aligned} \alpha _A^1= \alpha _B^2=\alpha _C^3=0, \text { and } \alpha _A^2=\alpha _B^3=\alpha _C^2= 1/10, \end{aligned}$$

while

$$\begin{aligned} \lambda _A^1= \lambda _B^2=\lambda _C^3=1/20, \text { and } \lambda _A^2=\lambda _B^3=\lambda _C^2= 0, \end{aligned}$$

and

$$\begin{aligned} \nu _{A,C}^1=\nu _{B,A}^2=\nu _{C,B}^3=0, \text { and } \nu _{C,A}^1=\nu _{A,B}^2=\nu _{B,C}^3=1/30. \end{aligned}$$

The length of each edge is fixed \(\ell _e=\ell =1\) and \((\tau _v,\eta _v)=(1,1/7)\) at each vertex \(v\in {\mathcal {V}}\). Finally, we have set different coefficients on each edge, namely \(d_A=1\), \(d_B=10^{-2}\) and \(d_C=10^{-3}\). Initially, we assume that infected individuals are only present at vertex \(v_1\) and each vertex has the same number of susceptible individuals fixed to 1/3. Finally, for each \(e\in {\mathcal {E}}\) we have set \(u_e^0(x)=0\) on \(\Omega _e\). We see in Fig. 13 that such a configuration can generate a second wave of infection at the first and second vertices showing that transient dynamics can be complex with multiple bumps of infection.

Fig. 13
figure 13

Time plot of infected populations in the case of 3 vertices and 3 edges in a triangular configuration between times [0, 500] (left) and a zoom for times between [150, 400] (right). We observe a second wave of infection at the first vertex resulting from incoming infected individuals that have successively passed through the two other vertices. This second wave is also present at the second vertex with a slight increase of \(I_2(t)\) after the second wave has reached the first vertex. Parameters values are set in the text

6.3 Case of 4 vertices and 3 edges

figure c

Next, we consider a star-shape graph with 4 vertices and 3 edges where one vertex is connected to the three others. In this configuration, we assume that our parameters may vary with respect to time, modeling locked down strategies for example (Griette et al. 2020; Liu et al. 2020). More precisely, we will assume that there exists \(T_{lock}\) and \(\mu _{lock}\) such that the transmission rates can be written as

$$\begin{aligned} \tau _v(t)=\left\{ \begin{array}{cl} \tau \,, &{} t\in [0,T_{lock}],\\ \frac{\tau \exp (-\mu _{lock}(t-T_{lock}))+\tau _{lock}}{1+\exp (-\mu _{lock}(t-T_{lock}))}\,, &{} t>T_{lock}, \end{array} \right. \end{aligned}$$

for each \(v\in {\mathcal {V}}\) and for a given \(0<\tau _{lock}<\tau \). We will assume that the four vertices are at equal distance such that \(\ell _e=\ell \) for each \(e\in {\mathcal {E}}\) and that the coefficient diffusion are equal on each edge, \(d_e=d\), \(e\in {\mathcal {E}}\). We further assume that at the central vertex \(v_2\) exchanges are no longer allowed after locked down. That is, we impose that

$$\begin{aligned} \alpha _e^2=\left\{ \begin{array}{cl} \alpha \,, &{} t\in [0,T_{lock}],\\ \alpha \exp (-\mu _{lock}(t-T_{lock}))\,, &{} t>T_{lock}, \end{array} \right. \quad e\in {\mathcal {E}}, \end{aligned}$$

while \(\alpha _e^j=\alpha \) for \(j\ne 2\) and \(e\in {\mathcal {E}}\), together with

$$\begin{aligned} \lambda _e^2=\left\{ \begin{array}{cl} \lambda \,, &{} t\in [0,T_{lock}],\\ \lambda \exp (-\mu _{lock}(t-T_{lock}))\,, &{} t>T_{lock}, \end{array} \right. \quad e\in {\mathcal {E}}, \end{aligned}$$

while \(\lambda _e^j=\lambda \) for \(j\ne 2\) and \(e\in {\mathcal {E}}\), and also

$$\begin{aligned} \nu _{e,e'}^2=\left\{ \begin{array}{cl} \nu \,, &{} t\in [0,T_{lock}],\\ \nu \exp (-\mu _{lock}(t-T_{lock}))\,, &{} t>T_{lock}, \end{array} \right. \quad (e,e')\in {\mathcal {E}}\times {\mathcal {E}}. \end{aligned}$$

Finally, we set \(\eta _v=\eta \) for all \(v\in {\mathcal {V}}\). Regarding the initial condition, we work with

$$\begin{aligned} (S_1^0,I_1^0,S_2^0,I_2^0,S_3^0,I_3^0,S_4^0,I_4^0)=\left( S_0-I_0,I_0,S_0,0,S_0-\epsilon ,0,S_0+\epsilon ,0\right) , \end{aligned}$$

for given \((S_0,I_0,\epsilon )\), while for each \(e\in {\mathcal {E}}\) we have set \(u_e^0(x)=0\) on \(\Omega _e\).

Fig. 14
figure 14

Location of the time of maximal infection \(T_{max}\) for each vertex together with the corresponding amplitude \(I_{max}^j\) as a function of \(\tau _{lock}\) (left) with its projection in the \((T_{max},\tau _{lock})\)-plane (middle) and a zoom near the turning points (right). Other parameters are set to \(\ell =1\), \(d=0.1\), \(\eta =1/8\), \((\alpha ,\lambda ,\nu )=(1/8,1/20,1/20)\), \(T_{lock}=50\) and \(\mu _{lock}=100\) with \((S_0,I_0,\epsilon )=(1/4,10^{-6},10^{-2})\)

In Fig. 14, we report the location of the time of maximal infection \(T_{max}\) for each vertex together with the corresponding amplitude \(I_{max}^j=\max _{t\ge 0}I_j(t)\) as a function of \(\tau _{lock}\). We observe that below a critical value of \(\tau _{lock}\), the time of maximal infection always occurs at \(t=T_{max}=T_{lock}\) traducing the fact that the locked down strategy has no effect on the dynamics of the epidemic. At each vertex, we observe the same pattern: as \(\tau _{lock}\) is decreased the corresponding \(I_{max}^j\) is decreasing while \(T_{max}\) is increasing up to some value of \(\tau _{lock}\) where we observe a sudden turning point (see the right panel of Fig. 14). We observe that \(\tau _{lock,v_k}^{tp}\), the value of the turning point, is well approximated (actually always bounded by below) by the value at which the effective reproduction number of each vertex is equal to 1. Indeed we have \({\mathscr {R}}_{e,v_k}=1\) if and only if \(\tau _{v_k}^{c}=\frac{\eta _{v_k}}{S^0_{v_k}}\), and we find

$$\begin{aligned} \tau _{v_1}^{c}\simeq 0.5, \quad \tau _{v_2}^{c}= 0.5,\quad \tau _{v_3}^{c}\simeq 0.52, \quad \text { and } \quad \tau _{v_4}^{c}\simeq 0.48, \end{aligned}$$

with our specific values of the initial condition, while we have computed

$$\begin{aligned} \tau _{lock,v_1}^{tp}\simeq 0.53, \quad \tau _{lock,v_2}^{tp}\simeq 0.51,\quad \tau _{lock,v_3}^{tp}\simeq 0.53, \quad \text { and } \quad \tau _{lock,v_4}^{tp}\simeq 0.49. \end{aligned}$$

We also point out that when \(\tau _{lock}\) is below the turning point \(\tau _{lock,v_k}^{tp}\), the corresponding value of \(I_{max}^j\) is below \(10^{-3}\). On the other hand, in Fig. 15, we present similar results but this time \(\tau _{lock}\) is fixed and \(T_{lock}\) varies. Above some critical value of \(T_{lock}\), \(I_{max}^j\) saturates to a fixed value independent of \(T_{lock}\) traducing the fact that the locked down strategy has no effect on the dynamics of the epidemic if it occurs to late in time. Depending on the initial configuration of susceptible populations at each vertex, we observe intricate nonlinear relationships on the location of the time of maximal infection \(T_{max}\).

Fig. 15
figure 15

Location of the time of maximal infection \(T_{max}\) for each vertex together with the corresponding amplitude \(I_{max}^j\) as a function of \(T_{lock}\) for two configurations of initial susceptible populations at vertices \(v_3\) and \(v_4\), with \(\epsilon =10^{-1}\) (left) and \(\epsilon =10^{-2}\) (right). Other parameters are set to \(\ell =1\), \(d=0.1\), \(\eta =1/8\), \((\alpha ,\lambda ,\nu )=(1/8,1/20,1/20)\), \(T_{lock}=50\) and \(\eta _{lock}=0.6\) with \((S_0,I_0)=(1/4,10^{-6})\)

6.4 Case of \(N+1\) vertices and N edges

figure d
Fig. 16
figure 16

Time evolution of the infected (left) population \(I_j(t)\) and susceptible (right) populations \(S_j(t)\) at each vertex for several different initial conditions and \(N=24\). Top: infected individuals are initially present only at vertex. Middle: infected individuals are initially present only at the middle vertex. Bottom: infected individuals are initially present only at the first and last vertices. We observe a traveling wave of infectious activity propagating though the vertices. Parameters were set to \(\ell =1\), \(d=10^{-3}\), \((\tau ,\eta )=(1,1/75)\), and \((\alpha ,\lambda ,\nu )=(1/8,1/10,1/20)\), while the initial condition is \((S_0,I_0)=(1/25,10^{-6})\)

Fig. 17
figure 17

Left: Location of the maxima of the infected population \(I_j(t)\) at each vertex \(j\in \left\{ 1,\ldots ,25\right\} \) for several different diffusion coefficients \(d\in \left\{ 10^{-3},10^{-2},10^{-1}\right\} \). Right: Zoom of the left figure for small times. We observe that for very small d the location of the maxima is a long a line while it is curved for larger values of d. We also remark that if \(I_{\mathrm {max},1}^d\) denotes the maximum as a function of d at the first vertex, we have \(I_{\mathrm {max},1}^{d_1}\le I_{\mathrm {max},1}^{d_2}\) for \(d_1\le d_2\) while for larger vertices \(j\ge 6\) we have the reverse ordering \(I_{\mathrm {max},j}^{d_1}\ge I_{\mathrm {max},j}^{d_2}\) for \(d_1\le d_2\). Other parameters were set to \(\ell =1\), \((\tau ,\eta )=(1,1/75)\), and \((\alpha ,\lambda ,\nu )=(1/8,1/10,1/20)\), while the initial condition is \((S_0,I_0)=(1/25,10^{-6})\)

In our final example, we have considered a network of \(N+1\) vertices and N edges arranged in a lattice, in the sense that vertex \(v_j\) is only connected to vertices \(v_{j-1}\) and \(v_{j+1}\) via two different edges. Figure 16 shows the time evolution of the infected population \(I_{v_j}(t)\) and susceptible populations \(S_{v_j}(t)\) at each vertex for several different initial conditions when the length and diffusion coefficient of each edge are equal. In the first case (top panel), we assume that \(I_{v_1}^0>0\) while \(I_{v_j}^0=0\) for all other vertices, and observe a propagation of burst of activity among infected and susceptible populations. In the second case (middle panel), we assume that \(I_{v_{\lfloor N/2\rfloor }}^0>0\) while \(I_{v_j}^0=0\) for all other vertices, and we see the propagation of two bursts of activity among infected and susceptible populations going leftwards and rightwards. In the last case (bottom panel), we assume that \(I_{v_1}^0=I_{v_{N+1}}^0>0\) while \(I_{v_j}^0=0\) for all other vertices, and we note the propagation of two waves activity which collide at the middle vertex \(v_{\lfloor N/2\rfloor }\). For very small values of the diffusion coefficient d, this burst of epidemic activity seems to travel coherently and forms a coherent traveling wave, as can be seen in Fig. 17 where we represent the location of \(\max _{t>0}I_{v_j}(t)\) at each vertex. Such a traveling wave of epidemic activity share similarities with traveling waves in excitable media such as the propagation of electrical activity along a nerve cell (Hodgkin and Huxley 1952; Hupkes and Sandstede 2010) or calcium waves Sneyd (2005). When \(d=10^{-3}\), they are all aligned on the same line, where for smaller values \(d\in \left\{ 10^{-1},10^{-2}\right\} \) the location is a nonlinear curve. We also demonstrate that larger diffusion coefficient leads to a faster propagation of epidemic burst across vertices. Finally, we also remark that if \(I_{\mathrm {max},1}^d\) denotes the maximum as a function of d at the first vertex, we have \(I_{\mathrm {max},1}^{d_1}\le I_{\mathrm {max},1}^{d_2}\) for \(d_1\le d_2\) while for larger vertices \(j\ge 6\) we have the reverse ordering \(I_{\mathrm {max},j}^{d_1}\ge I_{\mathrm {max},j}^{d_2}\) for \(d_1\le d_2\).

For the numerical simulations presented in Figs. 16 and 17, we have assumed full symmetry in the parameters that is

$$\begin{aligned}&(\ell _e,d_e)=(\ell ,d), \quad e\in {\mathcal {E}},\quad (\tau _v,\eta _v)=(\tau ,\eta ), \quad v\in {\mathcal {V}},\\&(\alpha _e^v,\lambda _e^v)=(\alpha ,\lambda ), \quad (e,v)\in {\mathcal {E}}\times {\mathcal {V}}, \quad \nu _{e,e'}^v=\nu , \quad (e,e',v)\in {\mathcal {E}}\times {\mathcal {E}}\times {\mathcal {V}}. \end{aligned}$$

Regarding the initial condition on the edge, we have set \(u_e^0(x)=0\) on \(\Omega _e\) for each \(e\in {\mathcal {E}}\).

7 Discussion

7.1 Summary of main results

In this work, we have proposed a new model that describes the dynamics of epidemic spreading on connected graphs. Our model consists in a PDE-ODE system where at each vertex of the graph we have a standard SIR model and connections between vertices are given by heat equations on the edges supplemented with Robin like boundary conditions at the vertices modeling exchanges between incident edges and the associated vertex. Our first main result is the existence and uniqueness of classical, global in time, solutions of our PDE-ODE model. Our second main result is a complete characterization of the long time behavior of the unique solution of our model. We proved that the final total populations of infected individuals at each vertex are well defined quantities and solutions of a system implicit equations. We also managed to obtain further qualitative properties in the fully symmetric case by exhibiting closed form formula and relate these quantities to standard basic and effective reproductive number for classical SIR model. Next, we proposed and analyzed a semi-implicit in time numerical scheme based on finite differences in space which has the property to preserve a discrete total mass associated to the discretization. We have further proved that if the time discretization constant is smaller than a universal constant depending only on the parameters of the system (and not on the space discretization constant) and if the exchanges of fluxes are symmetric at each vertex, then our mass preserving semi-implicit numerical scheme is well-posed and preserves the positivity of the solutions. And finally, we illustrated our theoretical findings with selection of numerical simulations for various types of graphs showing very interesting dynamics such traveling waves.

7.2 Biological limitations of the model and possible extensions

The first biological limitation of our model comes from the purely diffusive behavior imposed on each edge of the graph. It would be biologically relevant to incorporate some kind of directed or ballistic motion (drift term in (2.2)) given that many individuals set off on transportation lines travel from one specific city to another preferentially, see Bertaglia and Pareschi (2021) for a purely hyperbolic model. This would result in an equation on each edge of the form

$$\begin{aligned} \partial _t u_e(t,x)=d_e \partial _x^2 u_e(t,x)+c_e \partial _x u_e(t,x), \quad t>0, \quad x\in \overset{\circ }{\Omega }_e, \end{aligned}$$

for some speed \(c_e \in {\mathbb {R}}\) whose sign will determine the preferred direction of transportation. Such a drift term modifies the boundary conditions at each vertex according to

$$\begin{aligned} D_v \partial _n {\mathbf {u}}_v(t)+{\widetilde{K}}_v{\mathbf {u}}_v(t)=\Lambda _v {\mathbf {I}}_v(t), \end{aligned}$$

where \({\widetilde{K}}_v\) is given by \({\widetilde{K}}_v=K_v-C_v\) where \(C_v=\mathrm {diag}\left[ (c_e)_{e\sim v}\right] \). We expect that the long time dynamics of the system with such a directed motion, which is still mass preserving, will be somehow similar to the purely diffusive case, and that only transient dynamics will be affected. However, we leave it as an open modeling problem at the moment.

A second biological limitation comes from our assumption that the movement of individuals in the susceptible population does not affect its distribution and thus only the infected population is subject to movement. Considering the susceptible population as an ambient population was a first step, and it would be natural to extend our model to the case that individuals in the susceptible population can also move along our transportation network. In the case of spatially extended systems of reaction-diffusion type, it is notorious that allowing the susceptible population to diffuse is more challenging from a theoretical point of view as monotonicity properties of the solutions are lost (Berestycki et al. 2020). We leave such an analysis for a future work.

7.3 Scaling limits

Several scaling limits could be considered and we present two directions which seem natural and very promising. First, it would be very interesting to investigate the limit of large diffusivity along the edges of the graph. One should be able to recover a class of network-based ODE models that have been studied in the literature. Indeed, we expect that in this limit, one should obtain an ODE for some \(U_e(t)\) (now independent of \(x\in \overset{\circ }{\Omega }_e\)) along the edges that depends only on the population levels at the two connecting nodes. This should lead to an ODE system at the vertices of the graph that is globally coupled to \((U_e)_{e\in {\mathcal {E}}}\).

Another natural limit to investigate is the one where the number of vertices of the graph goes to infinity along with the length of the edges which shall converge to zero. One would expect to obtain in the limit a PDE system describing the evolution of spatially continuous populations of susceptible, infected and removed populations. Depending on the initial geometry of the graph the limiting PDE will either be posed on the real line or on some two-dimensional domain. The exchange term between infected individuals at the edges, given by \(\sum _{e\sim v} \alpha ^v_e u_e(t,v)-{\overline{\lambda }}_vI_v(t)\), is likely to produce in the limit a spatial diffusion term and we expect to recover reaction-diffusion like models such as the ones in Aronson (1977), Berestycki et al. (2020) and Berestycki et al. (2020).