1 Introduction

Quantifying the influence of random model parameters as well as uncertain initial or boundary conditions has become an important task in computational science and engineering. Uncertainty Quantification (UQ) addresses this issue and provides a variety of mathematical methods to examine the influence of uncertain input parameters on numerical solutions and derived quantities of interest.

In this article we study (spatially) one-dimensional systems of random hyperbolic conservation laws, where the uncertainty stems from random initial data or from random flux functions. Based on Kružkov’s work [23], a firm theory for random scalar conservation laws in several space dimensions has been developed [25, 26, 31]. Compared to scalar equations, little is known about existence and uniqueness of entropy solutions for systems of hyperbolic conservation laws, especially in multiple space dimensions. For one-dimensional systems with initial data with small total variation, Glimm provided a proof for the global existence of entropy admissible solutions [17]. Later, Bressan and coauthors [5,6,7] proved that the entropy admissible solutions constructed by the Glimm scheme (or equivalently by wave-front tracking) are unique in the sense that they are the only entropy admissible solutions satisfying additional stability properties such as certain bounds on the growth of their total variation. Based on these deterministic results, we prove the existence and uniqueness of so-called random entropy admissible solutions for one-dimensional systems of random hyperbolic conservation laws (Theorem 3.3).

Having established existence and uniqueness we approximate the random entropy admissible solution numerically. We discretize the random space by the Stochastic Collocation (SC) method [1, 2, 37]. The method is non-intrusive, which means that the underlying deterministic solver does not need to be modified. Moreover, it is easily parallelizable and it avoids the problem of losing hyperbolicity for nonlinear hyperbolic systems, a major drawback of many intrusive methods, most notably the Stochastic Galerkin method [29]. As specific deterministic solver we use the Runge–Kutta Discontinuous Galerkin method [11].

For nonlinear random hyperbolic conservation laws, discontinuities, both in physical and stochastic space, may appear in finite time. Due to its non-intrusive nature, it is straightforward to combine SC with space-time adaptive schemes on each sample. However, solutions may have localized features, such as discontinuities in stochastic space which makes it desirable to locally increase not only the spatial but also the stochastic mesh resolution. Adaptive algorithms for the (Multi-Element) Stochastic Collocation method and for the Simplex Stochastic Collocation method have been considered in [19, 34, 36]. The refinement criteria for these methods are based on heuristic considerations, namely the decay of higher-order modes or the difference between fine grid and coarse grid solutions and are not immediately linked to the true numerical error. Moreover, they do not consider refinement in physical space. An approach which combines both, physical and stochastic refinement, has been introduced in [8], where the authors consider random boundary value problems for second order partial differential equations and use adjoint methods to derive separable error bounds for linear quantities of interest. They then use the corresponding dual weighted residuals for local mesh refinement. For random elliptic problems adaptive mesh refinement based on a posteriori error estimates has been studied extensively, cf. [18, 32] and references therein. In contrast, such an analysis seems to be missing for random hyperbolic conservation laws and we aim at filling this gap.

In this work, we present as the first new contribution an a posteriori error analysis which is based on the following approach [24]: We view the numerical solution (or, more precisely, a reconstruction thereof) as the exact solution of a perturbed version of the original problem. The perturbation is given by a computable residual which acts as a source term. By using the appropriate stability theory for the problem at hand we can bound the difference between the exact and the numerical solution in terms of the residual. The suitable stability theory for systems of hyperbolic conservation laws is the relative entropy stability framework of Dafermos and DiPerna, see [12, Theorem 5.2.1].

The specific reconstructions that we use are based on reconstructions for deterministic problems suggested in [13], see also [16] for a modified reconstruction in terms of Stochastic Galerkin schemes. Using these reconstructions, we obtain a residual admitting a decomposition into a spatial and a stochastic part, which enables us to control the errors arising from spatial and stochastic discretization. Based on the a posteriori error estimate, we exploit the residuals’ structure and propose as the second novel contribution of this paper a residual-based space-stochastic adaptive numerical scheme. While the estimator provides reliable a posteriori error control for smooth solutions, it blows up under mesh refinement for discontinuous solutions. However, the residuals precisely capture the positions of rarefaction waves, contact discontinuities and shocks. Therefore, the residual-based space-stochastic adaptive numerical scheme leads to a significant error reduction compared to uniform mesh refinement. Due to its non-intrusive structure our proposed method admits a straightforward parallelization, the residuals are on-the-fly computable and the resulting adaptive schemes efficiently decrease the numerical error compared to uniform mesh refinement.

This article is structured as follows: In Sect. 2 we describe our equation of interest. In Sect. 3 we first review the deterministic well-posedness theory for one-dimensional systems of hyperbolic conservation laws. We then introduce the notion of random entropy admissible solutions and establish existence and uniqueness under suitable assumptions on the random initial data and random flux function. Section 4 describes the stochastic discretization and we show how to obtain the reconstruction from our numerical solution. In Sect. 5 we establish the a posteriori estimate and derive the splitting of the error estimator into a spatio-temporal and a stochastic part. Furthermore, we describe our space-stochastic adaptive numerical schemes. Finally, in Sect. 6, we provide various numerical examples for the Euler equations, where on the one hand we examine the scaling behavior of the corresponding residuals and on the other hand we compare the error reduction of our adaptive numerical algorithms to that of uniform mesh refinements and show that our adaptive schemes are indeed more efficient.

2 Preliminaries and notation

2.1 A primer on probability theory

Let \((\varOmega , \mathcal {F},\mathbb {P})\) be a probability space, where \(\varOmega \) is the set of all elementary events \(\omega \in \varOmega \), \(\mathcal {F}\) is a \(\sigma \)-algebra on \(\varOmega \) and \(\mathbb {P}\) is a probability measure. In the following we parametrize the uncertainty with a random vector \(\xi : \varOmega \rightarrow \varXi \subset \mathbb {R}^N\) with independent, absolutely continuous components, i.e. \(\xi (\omega ) = \big (\xi _1(\omega ),\ldots , \xi _N(\omega )\big ) : \varOmega \rightarrow \varXi \subset \mathbb {R}^N \). This means that for every random variable \(\xi _i\) there exists a density function \(w_{i} :\mathbb {R}\rightarrow [0,\infty )\), such that \(\int \limits _{\mathbb {R}} w_{i}(y)~ \mathrm {d}y=1\) and \(\mathbb {P}[ \xi _i \in A]=\int \limits _A w_{i}(y)~ \mathrm {d}y\), for any \(A \in {\mathcal {B}}(\mathbb {R})\), for all \(i=1,\ldots , N\). Here \({\mathcal {B}}(\mathbb {R})\) is the Borel \(\sigma \)-algebra on \(\mathbb {R}\). Moreover, the joint density function w of the random vector \(\xi = (\xi _1,\ldots ,\xi _N)\) can be written as

$$\begin{aligned} w(y) = \prod \limits _{i=1}^N w_{i}(y_i)\quad \forall ~ y= (y_1,\ldots , y_N)^\top \in \varXi . \end{aligned}$$

The random vector induces a push-forward probability measure \({\tilde{\mathbb {P}}}(B):= \mathbb {P}( \xi ^{-1}(B))\) for all \(B \in {\mathcal {B}}(\varXi )\) on the measurable space \((\varXi , {\mathcal {B}}(\varXi ))\). This measure is called the law of \(\xi \) and in the following we work on the image probability space \((\varXi , {\mathcal {B}}(\varXi ), {\tilde{\mathbb {P}}})\).

For a Banach space E and its Borel \(\sigma \)-algebra \({\mathcal {B}}(E)\), we consider the weighted \(L_{w}^p\)-spaces equipped with the norms

$$\begin{aligned} \Vert f\Vert _{L_w^p(\varXi ;E)} := \left\{ \begin{array}{ll} \Big (\int \limits _\varXi \Vert f(y)\Vert _E^p ~w(y)\mathrm {d}y\Big )^{1/p} = \mathbb {E}\Big (\Vert f\Vert _E^p\Big )^{1/p},\quad &{} 1\leqslant p<\infty \\ {{\text {ess sup}}}_{y \in \varXi } \Vert f(y)\Vert _E, &{}\quad p= \infty . \end{array}\right. \end{aligned}$$

2.2 Statement of the problem

We start with the following one-dimensional hyperbolic system of \(m \in \mathbb {N}\) (deterministic) conservation laws.

$$\begin{aligned} \begin{aligned} {\left\{ \begin{array}{ll} \partial _t u(t,x) + \partial _x F(u(t,x))= 0 , &{}\quad (t,x) \in (0,T) \times \mathbb {R}, \\ u(0,x)= u^0(x), &{}\quad x \in \mathbb {R}.\nonumber \end{array}\right. } \end{aligned} \end{aligned}$$
(IVP)

Here, \(u(t,x) \in \mathcal {U}\subset \mathbb {R}^m\) is the vector of conserved quantities, \(F\in C^2(\mathcal {U};\mathbb {R}^m)\) is the flux function, and \({\mathcal {U}}\subset \mathbb {R}^m\) is the state space, which is assumed to be an open set and \(T \in (0,\infty )\). We make the following assumptions on the initial condition and flux function.

  1. (D1)

    The initial condition satisfies \(u^0\in {L^1(\mathbb {R};\mathcal {U})}.\)

  2. (D2)

    The Jacobian \(DF\) has m distinct real eigenvalues, with each characteristic field being either genuinely nonlinear or linearly degenerate [12, Def. 3.1.1, Def. 7.5.1].

For our probabilistic equation of interest we admit in (IVP) random variations in the flux and initial datum, leading to the following one-dimensional system of \(m \in \mathbb {N}\) random conservation laws.

$$\begin{aligned} {\left\{ \begin{array}{ll} \partial _t u(t,x,y) + \partial _x F(u(t,x,y),y)= 0, &{}\quad (t,x,y) \in (0,T) \times \mathbb {R}\times \varXi , \\ u(0,x,y)= u^0(x,y), &{}\quad (x,y) \in \mathbb {R}\times \varXi .\nonumber \end{array}\right. } \end{aligned}$$
(RIVP)

Here, \(u(t,x,y) \in \mathcal {U}\subset \mathbb {R}^m\) is the random vector of conserved quantities and \(F(\cdot ,y)\in C^2(\mathcal {U};\mathbb {R}^m)\), \(\tilde{\mathbb {P}}\text {-a.s. } y \in \varXi \) is the random flux function.

For the sake of simplicity we keep the same notation for the solution and for the flux as in (IVP) and make the following assumptions on the random initial condition and on the random flux function. Note that these assumption are the probabilistic versions of assumptions (D1) and (D2).

  1. (R1)

    The uncertain initial condition satisfies \(u^0\in L_{w}^{1}(\varXi ;L^1(\mathbb {R};\mathcal {U})).\)

  2. (R2)

    For almost every realization \(y\in \varXi \), the Jacobian \(DF(\cdot ,y)\) has m distinct real eigenvalues, and each characteristic field is either linearly degenerate or genuinely nonlinear. Moreover, we assume that \(F\in L_{w}^{2}(\varXi ;C^2(\mathcal {U};\mathbb {R}^m))\).

3 Well-posedness: deterministic vs. random hyperbolic conservation laws

In this section we first review some classical results for deterministic one-dimensional hyperbolic conservation laws. We then introduce the notion of a random entropy solution for (RIVP) and establish its existence and uniqueness based on the results for the deterministic hyperbolic conservation law (IVP).

3.1 Deterministic hyperbolic conservation laws

Let us consider the deterministic initial value problem (IVP). We say that a strictly convex function \(\eta \in C^2(\mathcal {U};\mathbb {R})\) and a function \(q \in C^2(\mathcal {U};\mathbb {R})\) form an entropy/entropy-flux pair, if they satisfy \(D\eta DF=Dq\). We assume that the system (IVP) is endowed with at least one entropy/entropy-flux pair. We then define entropy admissible solutions in the following way.

Definition 3.1

(Entropy admissible solution) A function \(u\in L^1((0,T)\times \mathbb {R};\mathcal {U})\) is called an entropy admissible solution of (IVP), if it satisfies the following conditions:

  1. 1.

    It is a weak solution, i.e.

    $$\begin{aligned}&\int \limits _0^T \int \limits _{\mathbb {R}} \Big ( u(t,x) \cdot \partial _t \phi (t,x) + F(u(t,x)) \cdot \partial _x\phi (t,x)\Big )~\mathrm {d}x \mathrm {d}t \nonumber \\&\quad = - \int \limits _{\mathbb {R}} u^0(x) \cdot \phi (0,x)~ \mathrm {d}x, \end{aligned}$$
    (3.1)

    for all \(\phi \in C_c^\infty ([0,T)\times \mathbb {R};\mathbb {R}^m)\).

  2. 2.

    It satisfies the weak entropy inequality:

    $$\begin{aligned}&\int \limits _0^T \int \limits _{\mathbb {R}} \Big ( \eta (u(t,x)) \partial _t \varPhi (t,x) +q(u(t,x)) \partial _x\varPhi (t,x)\Big )~\mathrm {d}x \mathrm {d}t \nonumber \\&\quad \geqslant - \int \limits _{\mathbb {R}} \eta (u^0(x)) \varPhi (0,x)~ \mathrm {d}x, \end{aligned}$$
    (3.2)

    for all \(\varPhi \in C_c^\infty ([0,T)\times \mathbb {R};\mathbb {R}_+)\).

Theorem 3.1

([6], Theorem 2) Provided (D2) holds, there exists a non-empty closed domain \(\mathcal {D}\subset L^{1}(\mathbb {R};\mathcal {U})\) of integrable functions with small total variation and a semi-group \(\mathcal {S}(t): [0,\infty ) \times \mathcal {D}\rightarrow \mathcal {D}\), called Standard Riemann Semigroup (SRS), that is unique (up to its domain) and which has in particular the following properties:

  1. (i)

    There exists a constant \(L>0\), such that

    $$\begin{aligned} \Vert \mathcal {S}(s){\overline{u}}-&\mathcal {S}(t){\overline{v}}\Vert _{L^{1}(\mathbb {R};\mathbb {R}^m)} \leqslant L \Big (|s-t|+ \Vert {\overline{u}}- {\overline{v}}\Vert _{L^{1}(\mathbb {R};\mathbb {R}^m)}\Big ), \end{aligned}$$

    for all \({\overline{u}},{\overline{v}} \in \mathcal {D}\) and for all \(s,t\geqslant 0\).

  2. (ii)

    For \({\overline{u}}\in \mathcal {D}\) the function \(u(t,x):= (\mathcal {S}(t){\overline{u}})(x)\) is an entropy admissible solution of (IVP). It is the unique entropy admissible solution that is obtained as \(L^1\)-limit of the wave-front tracking algorithm.

Remark 3.1

(Uniqueness) While (IVP) may have several entropy admissible solutions there is one and only one entropy admissible solution induced by the SRS; in this sense entropy admissible solutions induced by SRS are unique. It was proven in [6] that the SRS-induced entropy admissible solution is the only entropy admissible solution satisfying certain additional stability properties, cf. [6, (A2),(A3)].

Additionally, we will use the following result on the stability of the SRS. In particular, it allows us to quantify how much the SRS-induced entropy admissible solution varies if the flux is changed.

Theorem 3.2

([4], Corollary 2.5) Let the flux function \(F\) satisfy (D2) and assume

$$\begin{aligned} \mathcal {D}(F) \subseteq \{u \in L^1(\mathbb {R},\mathcal {C})~|~TV(u) \leqslant M\}, \end{aligned}$$
(3.3)

for some suitable positive \(M\in \mathbb {R}\) and some compact set \(\mathcal {C}\subset \mathbb {R}^m\). For \(t>0\) we denote by \(\mathcal {S}(t,F)\) the SRS from Theorem 3.1, associated with the flux function \(F\).

Then, there exists a constant \(C>0\), such that for any flux function \( {\tilde{F}}\), satisfying (D2) and \(\mathcal {D}(\tilde{F}) \subseteq \mathcal {D}(F)\), it holds that

$$\begin{aligned} \Vert \mathcal {S}(t,F)u- \mathcal {S}(t,{\tilde{F}})u\Vert _{L^1(\mathbb {R},\mathbb {R}^m)} \leqslant C t \Vert DF-D{\tilde{F}}\Vert _{C^0(\mathcal {C}, \mathbb {R}^m)}, \end{aligned}$$
(3.4)

for all \(u\in \mathcal {D}(\tilde{F})\).

Remark 3.2

(Domain of SRS) The domain of the SRS is discussed in [6, equation (1.3)]. Note that it can always be replaced by a smaller set in order to make sure that additional conditions (such as (3.3)) hold.

3.2 Existence and uniqueness of random entropy solutions

We now consider the random hyperbolic conservation law (RIVP) and introduce the notion of a random entropy admissible solution for (RIVP). We say that \(\eta \in L_{w}^{1}(\varXi ;C^2(\mathcal {U};\mathbb {R}^m))\), \(q \in L_{w}^{1}(\varXi ;C^2(\mathcal {U};\mathbb {R}^m))\) form a random entropy/entropy-flux pair if \(\eta (\cdot ,y)\) is strictly convex \(\tilde{\mathbb {P}}\text {-a.s. } y \in \varXi \) and if \(\eta \) and q satisfy \(D\eta (\cdot ,y) DF(\cdot ,y) =Dq(\cdot ,y)\), \(\tilde{\mathbb {P}}\text {-a.s. } y \in \varXi \). We assume that the random conservation law (RIVP) is equipped with at least one random entropy/entropy-flux pair.

We define random entropy admissible solutions as path-wise (w.r.t. y) entropy admissible solutions of (RIVP). In this sense the notion of random entropy admissible solutions generalizes the notion of entropy admissible solutions in a similar way as the notion of random entropy solutions, introduced by Schwab and Mishra [26] generalizes the notion of entropy solutions according to Kružkov [23].

Definition 3.2

(Random entropy admissible solution) A function \(u\in L_{w}^{1}(\varXi ;L^1((0,T)){\times \mathbb {R};\mathcal {U})}\) is called a random entropy admissible solution of (RIVP), if it satisfies the following conditions:

  1. 1.

    It is a weak solution:

    $$\begin{aligned}&\int \limits _0^T \int \limits _{\mathbb {R}} \Big ( u(t,x,y) \cdot \partial _t \phi (t,x) + F(u(t,x,y),y) \cdot \partial _x\phi (t,x)\Big )~\mathrm {d}x \mathrm {d}t \nonumber \\&\quad = - \int \limits _{\mathbb {R}} u^0(x,y) \cdot \phi (0,x)~ \mathrm {d}x, \end{aligned}$$
    (3.5)

    \(\tilde{\mathbb {P}}\text {-a.s. } y \in \varXi \) and for all \(\phi \in C_c^\infty ([0,T)\times \mathbb {R};\mathbb {R}^m)\).

  2. 2.

    It satisfies the weak entropy inequality:

    $$\begin{aligned}&\int \limits _0^T \int \limits _{\mathbb {R}} \Big ( \eta (u(t,x,y),y) \partial _t \varPhi (t,x) +q(u(t,x,y),y) \partial _x\varPhi (t,x)\Big )~\mathrm {d}x \mathrm {d}t \nonumber \\&\quad \geqslant - \int \limits _{\mathbb {R}} \eta (u^0(x,y),y) \varPhi (0,x)~ \mathrm {d}x , \end{aligned}$$
    (3.6)

    \(\tilde{\mathbb {P}}\text {-a.s. } y \in \varXi \) and for all \(\varPhi \in C_c^\infty ([0,T)\times \mathbb {R};\mathbb {R}_+)\).

Remark 3.3

  1. (i)

    Let u be a random entropy admissible solution, then for almost any fixed realization \({\tilde{y}}\in \varXi \), the function \(u(\cdot ,\cdot ,{\tilde{y}})\) is an entropy admissible solution of the deterministic version of (RIVP) in the sense of Sect. 3.1.

  2. (ii)

    The function \(u(t,x,y) := \big (\mathcal {S}(t,F(\cdot ,y)) u^0(\cdot ,y)\big )(x)\), where \(\{\mathcal {S}(t,F(\cdot ,y))\}_{t\geqslant 0}\) is the SRS from Theorem 3.1 associated with the flux-function \(F(\cdot ,y)\), obviously satisfies (3.5) and (3.6) \(\tilde{\mathbb {P}}\text {-a.s. } y \in \varXi \). Theorem 3.3 below discusses the regularity of u w.r.t. y, i.e. under which conditions u is indeed a random entropy admissible solution of (RIVP).

To ensure the existence of a random entropy admissible solution of (RIVP) by applying Theorem 3.1 and Theorem 3.2 path-wise in \(\varXi \) we make the following assumptions:

  1. (R3)

    We define \(\mathcal {D}:= \bigcap _{y\in \varXi } \mathcal {D}(F(\cdot ,y))\), where \(\mathcal {D}(F(\cdot ,y))\) is the domain of the SRS from (3.3) in Theorem 3.2. We assume that and \(u^0(\cdot ,y)\in \mathcal {D}\), \(\tilde{\mathbb {P}}\text {-a.s. } y \in \varXi \).

  2. (R4)

    There exists a compact and convex set \(\mathcal {C}\subset \mathcal {U}\), s.t. \(\mathcal {S}(t,F(\cdot ,y)) u^0(\cdot ,y)(x) \in \mathcal {C}\), a.e. \((t,x,y)\in (0,T)\times \mathbb {R}\times ~\varXi \) and \(u^0(x,y) \in \mathcal {C}\), a.e. \((x,y) \in \mathbb {R}\times ~\varXi \).

Theorem 3.3

Let the assumptions (R1)-(R4) hold. For \(\tilde{\mathbb {P}}\text {-a.s. } y \in \varXi \) we define \(u(t,x,y) := \mathcal {S}(t,F(\cdot ,y)) u^0(\cdot ,y)(x)\), where \(\{\mathcal {S}(t,F(\cdot ,y))\}_{t\geqslant 0}\) is the SRS from Theorem 3.1 associated with the flux-function \(F(\cdot ,y)\).

Then \(u\) is a random entropy admissible solution of (RIVP). It is unique in the sense that it is the only random entropy admissible solution that coincides path-wise with the SRS-induced entropy admissible solution of the deterministic version of (RIVP).

Proof

The function \(u\) is path-wise the unique SRS-induced entropy solution of (RIVP) by construction. Note that we have assumed \(u^0(\cdot ,y) \in \mathcal {D}\subset \mathcal {D}(\cdot , F(\cdot , y))\), \(\tilde{\mathbb {P}}\text {-a.s. } y \in \varXi \). It remains to show, that u is a random variable, i.e.

$$\begin{aligned} \Big ( \varXi , {\mathcal {B}}(\varXi )\Big ) \ni y \mapsto u(\cdot ,\cdot ,y)\in \Big (L^{1}((0,T)\times \mathbb {R};\mathbb {R}^m), {\mathcal {B}}((L^{1}((0,T)\times \mathbb {R};\mathbb {R}^m)))\Big ) \end{aligned}$$

is a measurable map. To this end we define the Banach space

$$\begin{aligned} E_1:= L^{1}(\mathbb {R};\mathbb {R}^m) \times C^2(\mathcal {C};\mathbb {R}^m), \end{aligned}$$

equipped with the norm

$$\begin{aligned} \Vert ({\overline{u}},{\overline{F}})\Vert _{E_1}:= \Vert {\overline{u}}\Vert _{L^{1}(\mathbb {R};\mathbb {R}^m)} + \Vert {\overline{F}}\Vert _{C^2(\mathcal {C};\mathbb {R}^m)}. \end{aligned}$$

Using Theorem 3.1 (i) and Theorem 3.2, which we can apply due to assumptions (R3) and (R4), we deduce

$$\begin{aligned}&\Vert \mathcal {S}(t,F(\cdot ,y)) u^0(\cdot ,y) - \mathcal {S}(t,F(\cdot ,{\tilde{y}})) u^0(\cdot ,{\tilde{y}})\Vert _{L^{1}(\mathbb {R};\mathbb {R}^m)} \\&\quad \leqslant \Vert \mathcal {S}(t,F(\cdot ,y)) u^0(\cdot ,y) - \mathcal {S}(t,F(\cdot ,{\tilde{y}})) u^0(\cdot ,{y})\Vert _{L^{1}(\mathbb {R};\mathbb {R}^m)} \\&\qquad + \Vert \mathcal {S}(t,F(\cdot ,{\tilde{y}})) u^0(\cdot ,{y})- \mathcal {S}(t,F(\cdot ,{\tilde{y}})) u^0(\cdot ,{\tilde{y}})\Vert _{L^{1}(\mathbb {R};\mathbb {R}^m)} \nonumber \\&\quad \leqslant ~C t \Vert DF(\cdot ,y) -DF(\cdot ,{\tilde{y}})\Vert _{C^0(\mathcal {C}, \mathbb {R}^m)} + L \Vert u^0(\cdot ,y)- u^0(\cdot ,{\tilde{y}})\Vert _{L^{1}(\mathbb {R};\mathbb {R}^m)} \\&\quad \leqslant ~Ct \Vert F(\cdot ,y)-F(\cdot ,{\tilde{y}})\Vert _{C^2(\mathcal {C};\mathbb {R}^m)} + L \Vert u^0(\cdot ,y)- u^0(\cdot ,{\tilde{y}})\Vert _{L^{1}(\mathbb {R};\mathbb {R}^m)}, \end{aligned}$$

for \({\tilde{\mathbb {P}}}\)-a.s. \(y,{\tilde{y}}\in \varXi \).

Hence, the mapping \(\mathrm {S}(t): ({\overline{u}},{{\overline{F}}}) \ni E_1 \rightarrow L^{1}(\mathbb {R};\mathbb {R}^m)\), \(\mathrm {S}(t)({\overline{u}},{{\overline{F}}}):=\mathcal {S}(t,{\overline{F}}){\overline{u}}(\cdot )\) is continuous for all \(t>0\). Due to the finite time horizon we immediately deduce that the mapping

$$\begin{aligned} \mathrm {S}: E_1 \rightarrow L^{1}((0,T)\times \mathbb {R};\mathbb {R}^m),~\mathrm {S}({\overline{u}},{{\overline{F}}}):=\mathcal {S}(\cdot ,{\overline{F}}){\overline{u}}(\cdot ) \end{aligned}$$

is also continuous. Finally, it follows from assumptions (R1) and (R2) that the mapping

$$\begin{aligned} \mathrm {S}_0: \Big (\varXi ,{\mathcal {B}} (\varXi )\Big ) \rightarrow \Big (E_1, {\mathcal {B}}(E_1)\Big ), ~\mathrm {S}_0(y) := (u^0(\cdot , y), F(\cdot ,y)) \end{aligned}$$

is measurable. Thus, \(y \mapsto u(\cdot ,\cdot ,y)= \mathcal {S}(\cdot ,F(\cdot ,y))u^0(\cdot ,y)= \mathrm {S}\circ \mathrm {S}_0(y)\) is a composition of measurable mappings and hence measurable itself. \(\square \)

4 Space-time stochastic discretization and reconstructions

One major goal of this paper is to prove an a posteriori estimate for a large class of numerical approximations of (RIVP). In particular, we consider numerical schemes that combine Stochastic Collocation (SC) with Runge–Kutta Discontinuous Galerkin (RKDG) schemes. To this end, we recapitulate the SC method for the (non-intrusive) discretization of the random space \(\varXi \) as for example in [1, 37]. Additionally, we recall the Multi-Element method which decomposes the random space \(\varXi \) into smaller elements to allow for a local interpolation in the random space [35]. Finally, we describe a reconstruction of the numerical solution as a Lipschitz continuous function. The reconstruction will be used in the a posteriori error estimate in Sect. 5.

4.1 The stochastic collocation method

The idea of the SC method is to approximate the random entropy admissible solution of (RIVP) by a polynomial interpolant in the random space, where the interpolant is supposed to satisfy (RIVP) at collocation points \(\{y_i\}_{i=0}^M \subset \mathbb {R}\), \(M \in \mathbb {N}\). The exact solution \(u(\cdot ,\cdot , y_i)\) at a given collocation point \(y_i\), \(i=0,\ldots ,M\), is then approximated by a discrete solution \(u_h(\cdot ,\cdot , y_i)\) using any suitable numerical method.

For a multi-dimensional random space \(\varXi \subset \mathbb {R}^N\), we define \(\varXi _i:= \xi _i(\varOmega )\) and follow [2] to first define the space \({\mathcal {P}}_q(\varXi )\) of tensor product polynomials of maximal degree \(q \in \mathbb {N}_0\) by

$$\begin{aligned} {\mathcal {P}}_q(\varXi ):= \bigotimes \limits _{i=1}^{N}{\mathcal {P}}_{q}(\varXi _i), \quad {\mathcal {P}}_{q}(\varXi _i):=\{p:\varXi _i \rightarrow \mathbb {R}~|~p \text { is a polynomial of degree } q \}. \end{aligned}$$

Remark 4.1

Our analysis does not depend on the structure of the approximating space, i.e. instead of considering a fixed polynomial degree \(q \in \mathbb {N}_0\) for every random dimension we could also consider variable polynomial degrees \(q_i \in \mathbb {N}\), \(i=1,\ldots ,N\). Moreover, we could also consider complete polynomial spaces, cf. [37] or sparse grids, cf. [9, 28], instead of using tensor product spaces. As a rule of thumb, one might say that tensor-products are feasible for up to five random dimensions, while more than five dimensions require sparse grids, cf. [37].

We let \({\mathcal {K}}:= \{\mathrm {k}=(k_1,\ldots ,k_N)^\top \in \mathbb {N}_0^{N}: k_i \leqslant q,~ i=1\ldots ,N \}\) be the corresponding multi-index set and define the collocation points \(y_\mathrm {k}=(y_{1,k_1},\ldots ,y_{N,k_N})\in \varXi \), \(\mathrm {k}\in \mathcal {K}\). As a basis of \({\mathcal {P}}_{q}(\varXi _i)\) we choose the Lagrange basis \(\{l_{i,k} \}_{k=0}^{q}\) associated with the collocation points \(\{y_{i,k}\}_{k=0}^{q}\), such that

$$\begin{aligned} l_{i,k}(y_{i,j})= \delta _{k,j},\qquad \forall ~j,k=0,\ldots ,q, \end{aligned}$$

for all \(i=1,\ldots ,N\). We then define the multivariate Lagrange polynomials via

$$\begin{aligned} l_{\mathrm {k}}(y):= l_{1,k_1}(y_{1})\cdot \ldots \cdot l_{N,k_N}(y_{N}),\quad y \in \varXi , \ \mathrm {k}\in {\mathcal {K}}. \end{aligned}$$

Using the collocation points \(\{y_\mathrm {k}\}_{\mathrm {k}\in \mathcal {K}}\) as input parameters in (RIVP) yields \(\text {card}(\mathcal {K})=(q+1)^{N}\) (uncoupled) collocated initial value problems:

$$\begin{aligned} {\left\{ \begin{array}{ll} \partial _t u(t,x,y_\mathrm {k})+ \partial _x F(u(t,x,y_\mathrm {k}),y_\mathrm {k})=0 ,&{}(t,x) \in (0,T)\times \varLambda , \\ u(0,x,y_\mathrm {k})= u^0(x,y_\mathrm {k}), ~ &{}\varLambda \in \mathbb {R}. \end{array}\right. } \end{aligned}$$
(CIVP)

Here and in the following we consider \(\varLambda \in \{[0,1]_{per},\mathbb {R}\}\).

Remark 4.2

The well-posedness result in Theorem 3.3 only covers \(\varLambda = \mathbb {R}\). However, the deterministic well-posedness results are based on local estimates and we, therefore, believe that it can be extended to cover the case \(\varLambda = [0,1]_{per}\), as well.

Each of the deterministic hyperbolic systems in (CIVP) can be solved using the RKDG method described in Appendix A. For every collocation point \(y_\mathrm {k}\) we denote the corresponding numerical approximation at time \(t_n=t_n(y_\mathrm {k})\) by \(u_h^n(\cdot ,y_\mathrm {k}):= u_h(t_n,\cdot , y_\mathrm {k})\). Let us assume that the time-partition \(\{t_n\}_{n=0}^{N_t}\) is the same for every collocation point \(\{y_\mathrm {k}\}_{\mathrm {k}\in \mathcal {K}}\). The numerical approximation of (RIVP) at time \(t=t_n\) can then be written as

$$\begin{aligned} u_h^n(x,y):= \sum \limits _{\mathrm {k}\in \mathcal {K}} u_h^n(x,y_\mathrm {k}) l_\mathrm {k}(y). \end{aligned}$$
(4.1)

An important aspect of the SC method is the choice of collocation points \(\{y_{i,k} \}_{k=0}^{q}\subset \varXi _i\). Depending on the distribution of the random variable \(\xi _i\) we choose the collocation points as zeros of the corresponding (orthogonal) chaos polynomials [38]. For example, if \(\xi _i\sim {\mathcal {U}}(a,b)\) is uniformly distributed, we choose \(\{y_{i,k} \}_{k=0}^{q}\) to be the roots of the \((q+1)\)-th Legendre polynomial. For a Gaussian distribution we use the roots of the Hermite polynomials accordingly.

One can then approximate the mean of \(u_h^n(x,\cdot )\) via numerical quadrature, i.e.

$$\begin{aligned} \mathbb {E}\Big (u_h^n(x,\cdot )\Big ) = \int \limits _{\varXi } u_h^n(x,y)~w(y)\mathrm {d}y \approx \sum \limits _{\mathrm {k}\in \mathcal {K}} u_h^n(x,y_\mathrm {k}) w_\mathrm {k}. \end{aligned}$$

Here \(w_\mathrm {k}\) are products of the corresponding one-dimensional weights.

4.2 The multi-element stochastic collocation method

A major drawback of any global approximation approach in \(\varXi \) for hyperbolic conservation laws is that, due to the Gibbs phenomenon, the interpolant may oscillate for discontinuous solutions, cf. [29, 34]. To overcome this issue, we employ the Multi-Element (ME) approach as presented in [35], i.e. we subdivide \(\varXi \) into disjoint elements and consider a local approximation of (RIVP) on every element in random space.

For the ease of presentation we assume that \(\varXi =[0,1]^N,\) and let \(0= d_1< d_2< \cdots < d_{N_{\varXi }+1}= 1\) be a decomposition of [0, 1]. We define \(D_{n} := [d_{n}, d_{n+1} )\), for \( n= 1,\ldots , N_{\varXi }-1,\) and \(D_{N_{\varXi }} := [d_{N_{\varXi }}, d_{N_{\varXi }+1}]\). Introducing the set \({\mathcal {M}}:= \{\mathrm {m}=(m_1,\ldots ,m_N)^\top \in \mathbb {N}_0^{N}: m_i \leqslant N_{\varXi },~ i=1\ldots ,N \} \) allows us to define for \(\mathrm {m}\in {\mathcal {M}}\), the Multi-Element \(D_{\mathrm {m}} := \mathop {\times }\limits _{i=1}^N D_{m_i}\). Hence, we consider a new local random variable \(\xi ^{\mathrm {m}}: \xi ^{-1}(D_{\mathrm {m}}) \rightarrow D_{\mathrm {m}}\) on the local probability space \((\xi ^{-1}(D_{\mathrm {m}}),\mathcal {F}\cap \xi ^{-1}(D_{\mathrm {m}}),\mathbb {P}(\cdot | \xi ^{-1}(D_{\mathrm {m}})))\). Using Bayes’ rule we can compute the local probability density function of \(\xi ^{\mathrm {m}}\) via

$$\begin{aligned} w_{\xi ^{\mathrm {m}}}:=w_{\xi }(y^\mathrm {m}|\xi ^{-1}(D_{\mathrm {m}})) = \frac{w_\xi (y^\mathrm {m})}{\mathbb {P}(\xi ^{-1}(D_{\mathrm {m}}))} ,\qquad y^\mathrm {m}\in D_\mathrm {m}, \end{aligned}$$
(4.2)

where \(\mathbb {P}(\xi ^{-1}(D_{\mathrm {m}}))>0\) for \(\mathrm {m}\in {\mathcal {M}}\) can be assumed w.l.o.g., due to the independence of the corresponding random variables. We parametrize the uncertain input in (RIVP) using the local random variable \(\xi ^{\mathrm {m}}\) and consider a local approximation on every \(D_{\mathrm {m}}\) at time \(t=t_n\), \(n=0,\ldots ,N_t\),

$$\begin{aligned} u_h^{\mathrm {m}}(t_n,x,y) = \sum _{\mathrm {k}\in \mathcal {K}} u_h(t_n,x, y_\mathrm {k}^\mathrm {m}) l_{\mathrm {k}}^{\mathrm {m}} (y), \end{aligned}$$
(4.3)

for all \(\mathrm {m}\in {\mathcal {M}}\). Here, \(\{y_{\mathrm {k}}^{\mathrm {m}} \}_{\mathrm {k}\in \mathcal {K}} \subset D_\mathrm {m}\) are the local collocation points in \(D_\mathrm {m}\), \(\mathrm {m}\in {\mathcal {M}}\) and the \(\{l_{\mathrm {k}}^{\mathrm {m}} \}_{\mathrm {k}\in \mathcal {K}} \) are the corresponding Lagrange polynomials on \(D_\mathrm {m}\). The global Multi-Element Stochastic Collocation (ME-SC) approximation at time \(t=t_n\), can then be written as

$$\begin{aligned} u_h(t_n,x,y)= \sum _{ \mathrm {m}\in {\mathcal {M}}} u_h^\mathrm {m}(t_n,x,y) \chi _{D_\mathrm {m}}(y) = \sum _{ \mathrm {m}\in {\mathcal {M}}} \sum _{\mathrm {k}\in \mathcal {K}} u_h(t_n,x, y_\mathrm {k}^\mathrm {m}) l_{\mathrm {k}}^{\mathrm {m}} (y) \chi _{D_\mathrm {m}}(y), \end{aligned}$$
(4.4)

where \(\chi _{D_\mathrm {m}}\) is the indicator function of \(D_\mathrm {m}\).

4.3 Space-time-stochastic reconstructions

For the space-time discretization of (CIVP) we use the RKDG framework from [10]. For ease of presentation, we move the description of the RKDG scheme and the computation of its space-time reconstruction to Appendix A.

As discussed in Appendix A, we have for each collocation point \(y_{\mathrm {k}}\), \(\mathrm {k}\in \mathcal {K}\), a computable space-time reconstruction \(\hat{u}^{st}(y_{\mathrm {k}}) = \hat{u}^{st}(\cdot ,\cdot , y_{\mathrm {k}}) \in W_\infty ^1((0,T);V_{p+1}^s\cap C^0(\varLambda ))\) of the numerical approximation \(u_h(\cdot ,\cdot ,y_{\mathrm {k}})\), where \(V_{p+1}^s\) denotes the space of piece-wise polynomials of degree \(p+1\) on a triangulation of \(\varLambda \). This allows us to define the space-time residual as follows.

Definition 4.1

(Space-time residual) We call the function \(R^{st}(y_\mathrm {k}) :=R^{st}(\cdot ,\cdot ,y_\mathrm {k}) \in L_{2}((0,T)\times \varLambda ;\mathbb {R}^m)\), defined by

$$\begin{aligned} R^{st}(t,x, y_\mathrm {k}):= \partial _t \hat{u}^{st}(t,x, y_\mathrm {k}) + \partial _x F(\hat{u}^{st}(t,x, y_\mathrm {k}),y_\mathrm {k}), \end{aligned}$$
(4.5)

the space-time residual associated with the collocation point \(y_\mathrm {k}\), for all \(\mathrm {k}\in \mathcal {K}\).

This residual is required in the subsequent analysis. In the next step we expand the space-time reconstruction into the corresponding random basis, i.e. in the Lagrange basis, to obtain the so-called space-time-stochastic reconstruction.

Definition 4.2

(Space-time-stochastic reconstruction) We call the function \(\hat{u}^{sts} \in {\mathcal {P}}_q(\varXi )\otimes \big ( W_\infty ^1(0,T); V_{p+1}^s \cap C^0(\varLambda )\big )\) defined by

$$\begin{aligned} \hat{u}^{sts}(t,x,y):= \sum \limits _{\mathrm {k}\in \mathcal {K}} \hat{u}^{st}(t,x,y_\mathrm {k})l_\mathrm {k}(y), \end{aligned}$$

the space-time-stochastic reconstruction of the numerical approximation \(u_h\) of (RIVP) (see (4.1)).

Similar to the space-time reconstruction, we may plug \(\hat{u}^{sts}\) into the random conservation law (RIVP) to obtain the so called space-time-stochastic residual.

Definition 4.3

(Space-time-stochastic residual) We define the space-time-stochastic residual \(R^{sts} \in L_{w}^{2}(\varXi ;L^2((0,T)\times \varLambda ;\mathbb {R}^m))\) by

$$\begin{aligned} R^{sts}(t,x,y):= \partial _{t} \hat{u}^{sts}(t,x,y) + \partial _{x}F(\hat{u}^{sts}(t,x,y), y) . \end{aligned}$$
(4.6)

We also need this residual for the upcoming error analysis.

5 A posteriori error estimate and adaptive algorithms

As already mentioned in the introduction, our a posteriori error estimate relies on the relative entropy stability framework of Dafermos and DiPerna, see [12] and references therein. The relative entropy method allows to measure the \(L^2\)-distance of two functions, one of them required to be Lipschitz continuous in space and time. This is the reason why we reconstructed the numerical solution and computed the space-time-stochastic reconstruction as a Lipschitz function.

Before stating the main a posteriori error estimate, we establish bounds on the derivatives of the flux function and the entropy, as they enter the upper bounds in the main estimate. Due to Assumption (R4) from Sect. 3.2 and the compactness of \(\mathcal {C}\), there exist \(\tilde{\mathbb {P}}\text {-a.s. } y \in \varXi \) constants \(0<C_{\overline{F}}(y) < \infty \) and \(0<C_{\underline{\eta }}(y)< C_{\overline{\eta }}(y)< \infty \), such that,

$$\begin{aligned} |v^\top H_u F(u,y)v|\leqslant C_{\overline{F}}(y)|v|^2, \quad C_{\underline{\eta }}(y)|v|^2 \leqslant v^\top H_u \eta (u,y)v \leqslant C_{\overline{\eta }}(y) |v|^2, \\ \forall v\in \mathbb {R}^m, \forall u\in \mathcal {C}. \end{aligned}$$

Here, for a generic function f, \(H_uf\) denotes its Hessian matrix which contains all second order derivatives with respect to u.

5.1 A posteriori error estimate and error splitting

We now have all ingredients together to state the following main a posteriori error estimate that can be directly derived from Theorem 5.5 in [15].

Theorem 5.1

(A posteriori error bound for the numerical solution) Let u be a random entropy admissible solution of (RIVP). Let the reconstruction \(\hat{u}^{sts}\) only take values in \({\mathcal {C}}\). Then, the difference between u and the numerical solution \(u_h^n\) from (4.1) satisfies

$$\begin{aligned}&\Vert u(t_n,\cdot ,\cdot )-u_h^n(\cdot ,\cdot )\Vert _{L_{w}^{2}({\tilde{\varXi }} ;L^2(\varLambda ))}^2 \\&\quad \leqslant 2\Vert \hat{u}^{sts}(t_n,\cdot ,\cdot )- u_h^n(\cdot ,\cdot )\Vert _{L_{w}^{2}({\tilde{\varXi }} ;L^2(\varLambda ))}^2 \\&\qquad + 2 \int \limits _{{\tilde{\varXi }}} \Big [\Big (C_{\underline{\eta }}^{-1}(y) \Big ( \mathcal {E}^{sts}(t_n,y) + C_{\overline{\eta }}(y) \mathcal {E}^{sts}_0(y) \Big )\Big ) \\&\qquad \times \exp \Big (\int \limits _0^{t_n} \frac{C_{\overline{\eta }}(y) C_{\overline{F}}(y) \Vert \partial _x \hat{u}^{sts}(t,\cdot ,y)\Vert _{L^\infty (\varLambda )} + C_{\overline{\eta }}^2(y)}{C_{\underline{\eta }}(y)}~\mathrm {d}t \Big ) \Big ] ~w(y)\mathrm {d}y, \end{aligned}$$

for all \(n=0,\ldots ,N_t\) and for any \({\tilde{\mathbb {P}}}\)-measurable set \({\tilde{\varXi }} \subseteq \varXi \). Here

$$\begin{aligned}&\mathcal {E}^{sts}(t_n,y):= \Vert R^{sts}(\cdot ,\cdot ,y)\Vert _{L^2((0,t_n)\times \varLambda )}^2, \end{aligned}$$
(5.1)
$$\begin{aligned}&\mathcal {E}^{sts}_0(y):= \Vert u^0(\cdot ,y)-\hat{u}^{sts}(0,\cdot ,y)\Vert _{L^2(\varLambda )}^2. \end{aligned}$$
(5.2)

Proof

Thanks to the path-wise structure we can apply the deterministic setting from [15, Theorem 5.5 ] for almost any \(y\in {\tilde{\varXi }} \subseteq \varXi \). Integrating over \({\tilde{\varXi }}\) gives the desired estimate directly. \(\square \)

In Theorem 5.1, the error between the numerical solution and the random entropy admissible solution is bounded by the error in the initial condition, the difference between the numerical solution and its reconstruction, and the contribution of the space-time stochastic residual \(R^{sts}\) from Definition 4.3, quantified by \(\mathcal {E}^{sts}\). However, we still cannot distinguish between errors that arise from discretizing the random space and the physical space. We, thus, are going to describe a splitting of the space-time-stochastic residual \(R^{sts}\) into a spatial and a stochastic residual.

Lemma 5.1

(Splitting of the space-time-stochastic residual) The space-time-stochastic residual \(R^{sts}\) admits the decomposition

$$\begin{aligned} R^{sts} = R^{det} + R^{stoch}, \end{aligned}$$
(5.3)

with

$$\begin{aligned} R^{det}&:= \sum \limits _{\mathrm {k}\in \mathcal {K}}R^{st}(y_\mathrm {k})l_\mathrm {k}\text { and} \end{aligned}$$
(5.4)
$$\begin{aligned} R^{stoch}&:= \Big (\partial _{x} F\Big ( \sum \limits _{\mathrm {k}\in \mathcal {K}} \hat{u}^{st}(y_\mathrm {k}) l_\mathrm {k},\cdot \Big ) - \sum \limits _{\mathrm {k}\in \mathcal {K}} \partial _{x} F(\hat{u}^{st}(y_\mathrm {k}),y_\mathrm {k}) l_\mathrm {k}\Big ) , \end{aligned}$$
(5.5)

where \(R^{st}(y_\mathrm {k})\) is defined in (4.5), \(R^{det}\) and \(R^{stoch}\) are called the deterministic and stochastic residual.

Proof

For every collocation point \(y_\mathrm {k},\)\(\mathrm {k}\in \mathcal {K}\), we compute in Appendix A the space-time reconstruction \(\hat{u}^{st}(\cdot ,\cdot ,y_\mathrm {k})\) which fulfills

$$\begin{aligned} R^{st}(y_\mathrm {k})= \partial _{t} \hat{u}^{st}(y_\mathrm {k}) + \partial _{x} F(\hat{u}^{st}(y_\mathrm {k}),y_\mathrm {k}). \end{aligned}$$
(5.6)

Moreover, we know from (4.6) that the space-time-stochastic reconstruction \(\hat{u}^{sts}=\sum \limits _{\mathrm {k}\in \mathcal {K}} \hat{u}^{st}(t,x,y_\mathrm {k})l_\mathrm {k}(y)\) satisfies the relation

$$\begin{aligned} R^{sts}= \partial _{t} \hat{u}^{sts} + \partial _{x}F(\hat{u}^{sts},\cdot ) = \partial _{t}\Big (\sum \limits _{\mathrm {k}\in \mathcal {K}} \hat{u}^{st}(y_\mathrm {k})l_\mathrm {k}\Big ) + \partial _{x} F\Big (\sum \limits _{\mathrm {k}\in \mathcal {K}} \hat{u}^{st}(y_\mathrm {k}) l_\mathrm {k}, \cdot \Big ). \end{aligned}$$
(5.7)

Multiplying (5.6) by \(l_\mathrm {k}\) and summing over \(\mathrm {k}\in \mathcal {K}\) yields

$$\begin{aligned} \sum \limits _{\mathrm {k}\in \mathcal {K}}R^{st}(y_\mathrm {k})l_\mathrm {k}= \sum \limits _{\mathrm {k}\in \mathcal {K}} \partial _{t} \hat{u}^{st}(y_\mathrm {k}) l_\mathrm {k}+ \sum \limits _{\mathrm {k}\in \mathcal {K}} \partial _{x} F(\hat{u}^{st}(y_\mathrm {k}),y_\mathrm {k}) l_\mathrm {k}. \end{aligned}$$
(5.8)

Inserting (5.8) into (5.7) yields

$$\begin{aligned} R^{sts}=&~\partial _{t}\Big (\sum \limits _{\mathrm {k}\in \mathcal {K}} \hat{u}^{st}(y_\mathrm {k}) l_\mathrm {k}\Big ) + \partial _{x} F\Big ( \sum \limits _{\mathrm {k}\in \mathcal {K}} \hat{u}^{st}(y_\mathrm {k}) l_\mathrm {k}, \cdot \Big ) \\&+ \sum \limits _{\mathrm {k}\in \mathcal {K}}R^{st}(y_\mathrm {k})l_\mathrm {k}- \Big (\sum \limits _{\mathrm {k}\in \mathcal {K}} \partial _{t} \hat{u}^{st}(y_\mathrm {k}) l_\mathrm {k}+ \sum \limits _{\mathrm {k}\in \mathcal {K}} \partial _{x} F(\hat{u}^{st}(y_\mathrm {k}),y_\mathrm {k}) l_\mathrm {k}\Big ) \nonumber \\ =&\sum \limits _{\mathrm {k}\in \mathcal {K}}R^{st}(y_\mathrm {k})l_\mathrm {k}+ \Big (\partial _{x} F\Big ( \sum \limits _{\mathrm {k}\in \mathcal {K}} \hat{u}^{st}(y_\mathrm {k}) l_\mathrm {k},\cdot \Big ) - \sum \limits _{\mathrm {k}\in \mathcal {K}} \partial _{x} F(\hat{u}^{st}(y_\mathrm {k}),y_\mathrm {k}) l_\mathrm {k}\Big ) \\ =&R^{det} + R^{stoch}. \end{aligned}$$

\(\square \)

In order to simplify Theorem 5.1, let us assume that the eigenvalues of the Hessian \(H_u\eta (u,y)\) are bounded from above and below by positive numbers, for any \(u \in \mathcal {C}\) uniformly in \(\varXi \). We let \(C_{\overline{\eta }}:= {\text {ess}}\sup \limits _{y \in \varXi } C_{\overline{\eta }}(y) < \infty \), \(C_{\underline{\eta }}:= {\text {ess}}\inf \limits _{y \in \varXi } C_{\overline{\eta }}(y) >0\) and \(C_{\overline{F}}:= {\text {ess}}\sup \limits _{y \in \varXi } C_{\overline{F}}(y) < \infty \).

Computing the constants \(C_{\underline{\eta }}, C_{\overline{\eta }}, C_{\overline{F}}\) means computing maxima and minima of continuous functions on the compact set \({\mathcal {C}} \times \varXi \), provided flux and entropy also depend continuously on the random variable. These maxima/minima can be approximated numerically. In case slightly larger (smaller) numbers are used instead of the correct maxima (minima) the error estimators will become less efficient, i.e. the amount by which they over-estimate the true error will be increased. However, the scaling properties of the error estimator will not be affected.

The following corollary is a simple consequence of the splitting in Lemma 5.1.

Corollary 5.1

(A posteriori error bound with error splitting and simplified bounds) Let u be a random entropy admissible solution of (RIVP). Then, the difference between u and the numerical solution \( u_h^n\) from (4.1) satisfies

$$\begin{aligned}&\Vert u(t_n,\cdot ,\cdot )-u_h^n(\cdot ,\cdot )\Vert _{L_{w}^{2}({\tilde{\varXi }};L^2(\varLambda ))}^2 \\&\quad \leqslant ~2\Vert \hat{u}^{sts}(t_n,\cdot ,\cdot )- u_h^n(\cdot ,\cdot )\Vert _{L_{w}^{2}({\tilde{\varXi }} ;L^2(\varLambda ))}^2 \\&\qquad + 2 C_{\underline{\eta }}^{-1} \Big ( 2\mathcal {E}^{det}(t_n)+2\mathcal {E}^{stoch}(t_n) + C_{\overline{\eta }}\mathcal {E}^{sts}_0 \Big ) \\&\qquad \times \exp \Big ( C_{\underline{\eta }}^{-1} \int \limits _0^{t_n} \Big (C_{\overline{\eta }}C_{\overline{F}}\Vert \partial _x \hat{u}^{sts}(t,\cdot ,y)\Vert _{L_{w}^{\infty }({\tilde{\varXi }};L^\infty (\varLambda ))} + C_{\overline{\eta }}^2\Big ) ~\mathrm {d}t \Big ) \end{aligned}$$

for \(n=0,\ldots , N_t\) and for all \({\tilde{\mathbb {P}}}\)-measurable sets \({\tilde{\varXi }} \subseteq \varXi \). Here,

$$\begin{aligned} \mathcal {E}^{det}(t_n)&:= \Vert R^{det}\Vert _{L_{w}^{2}({\tilde{\varXi }};L^2((0,t_n)\times \varLambda )}^2, \end{aligned}$$
(5.9)
$$\begin{aligned} \mathcal {E}^{stoch}(t_n)&:= \Vert R^{stoch}\Vert _{L_{w}^{2}({\tilde{\varXi }};L^2((0,t_n)\times \varLambda )}^2, \end{aligned}$$
(5.10)
$$\begin{aligned} \mathcal {E}^{sts}_0&:= \Vert u^0(\cdot ,\cdot )-\hat{u}^{sts}(0,\cdot ,\cdot )\Vert _{L_{w}^{2}({\tilde{\varXi }}; \varLambda )}^2. \end{aligned}$$
(5.11)

Remark 5.1

  1. (i)

    The residual \(R^{det}\) in (5.4) interpolates spatio-temporal residuals and contains information about the discretization error in physical space, i.e. the space-time resolution of (CIVP) using the RKDG method. In contrast to \(R^{det}\), the stochastic residual \(R^{stoch}\) in (5.5) indicates the quality of the interpolation in stochastic space.

  2. (ii)

    In order for the upcoming space-stochastic adaptive algorithm based on \(\mathcal {E}^{det}\), \(\mathcal {E}^{stoch}\) to be efficient, we need \(\mathcal {E}^{det}\) to depend solely on the space-time discretization and to be independent of the stochastic discretization. Similarly, we need \(\mathcal {E}^{stoch}\) to decay when the stochastic resolution is increased but to be independent of the space-time discretization.

    In Remark 5.2 we prove that \(\mathcal {E}^{det}\) is indeed unaffected by stochastic refinement. In Remark 5.3 we discuss the independence of the stochastic residual from the spatial discretization.

  3. (iii)

    The scaling properties of \(\mathcal {E}^{det}\) , resp. \(R^{st}(y_\mathrm {k})\), were studied in [13]. Currently we are not able to prove any of the scaling properties of \(\mathcal {E}^{stoch}\) w.r.t. to q and the number of Multi-Elements. However, our numerical experiments show that \(\mathcal {E}^{stoch}\) scales as desired, i.e. \(\mathcal {E}^{stoch}\) shows the same qualitative behavior as the stochastic interpolation error of the exact solution.

  4. (iv)

    As described in [13] and [16], \(R^{det}\) scales with \(\frac{1}{h}\) in the vicinity of shocks and contact discontinuities, i.e., it blows up under spatial mesh refinement in these areas, although the numerical solution converges towards the exact solution. Hence, we only have efficient a posteriori error control for smooth solutions of (RIVP). However, as \(R^{det}\) precisely captures the positions of rarefaction waves, contact discontinuities and shocks we use \(R^{det}\) and \(R^{stoch}\), resp. \(\mathcal {E}^{det}\) and \(\mathcal {E}^{stoch}\), as local indicators for our adaptive mesh refinement algorithms described in Sect. 5.2.

Remark 5.2

(Uniformity of the deterministic residual in\(\varXi \)) As noted above, the collocation points \(y_\mathrm {k}\) are chosen to be the zeros of the corresponding orthogonal polynomial depending on the distribution of \(\xi \). The deterministic residual \(R^{det}\) from (5.4) consists of Lagrange polynomials associated with the corresponding collocation points, thus Gaussian quadrature in \(\varXi \) yields

$$\begin{aligned} \mathcal {E}^{det}(T) = \Vert R^{det} \Vert _{{L_{w}^{2}(\varXi ;L^2((0,T)\times \varLambda )}}&= \sum \limits _{\mathrm {k}\in \mathcal {K}} \Vert R^{st}(y_\mathrm {k})\Vert _{L^2((0,T)\times \varLambda )} w_\mathrm {k}\\&\leqslant \max \limits _{\mathrm {k}\in \mathcal {K}} \Vert R^{st}(y_\mathrm {k})\Vert _{L^2((0,T)\times \varLambda )}. \end{aligned}$$

Hence, \(\mathcal {E}^{det}\) inherits the convergence order of \(R^{st}(y_\mathrm {k})\) and is not affected by the stochastic discretization.

Remark 5.3

(Decay of stochastic residual) Let us define the SC interpolation operator via \({\mathcal {I}}_{\mathcal {K}}(u):= \sum \limits _{\mathrm {k}\in \mathcal {K}} u(y_\mathrm {k}) l_\mathrm {k}\). Then, the stochastic residual \(R^{stoch}\) from (5.5) can be written as

$$\begin{aligned} R^{stoch}(t,x,\cdot )&= \Big (\partial _{x} F\Big ( \sum \limits _{\mathrm {k}\in \mathcal {K}} \hat{u}^{st}(t,x,y_\mathrm {k})l_\mathrm {k}(\cdot ),\cdot \Big ) - \sum \limits _{\mathrm {k}\in \mathcal {K}} \partial _{x} F(\hat{u}^{st}(t,x,y_\mathrm {k}),y_\mathrm {k}) l_\mathrm {k}(\cdot )\Big ) \\&= \partial _{x} F(\hat{u}^{sts}(t,x,\cdot ),\cdot ) - {\mathcal {I}}_{\mathcal {K}}\Big (\partial _xF(\hat{u}^{sts}(t,x,\cdot ),\cdot ) \Big ), \end{aligned}$$

for a.e. \((t,x) \in (0,T) \times \varLambda \). Hence, \(R^{stoch}\) corresponds to the stochastic interpolation error, when interpolating \(\partial _x (F\circ \hat{u}^{sts})\). As long as the regularity of the mapping \(y \mapsto \partial _{x} F(\hat{u}^{sts}(\cdot ,\cdot ,y),y )\) does not depend on the spatial mesh width h, \(R^{stoch}\) decays independently of h. We expect that this is indeed the case for smooth solutions, cf. [27, Remark 6]. Our numerical experiment in Sect. 6.3.1 confirms this assertion and shows that the convergence of \(\mathcal {E}^{stoch}\) is unaffected by the spatial resolution. In contrast, the regularity of \(y \mapsto \partial _{x} F(\hat{u}^{sts}(\cdot ,\cdot ,y),y )\) may depend on the spatial mesh width h in non-smooth cases. This is investigated in [27, Sec. 4.2.1], where the authors prove that in case of a wave equation with discontinuous wave speed, the radius of analyticity of the discrete solution depends on the spatial mesh width h.

5.2 Adaptive algorithms

The splitting of the space-time-stochastic residual into a deterministic and a stochastic residual helps us in developing adaptive numerical schemes where we use the residuals as local error indicators for spatial and stochastic mesh refinement. We describe the deterministic spatially adaptive algorithm, which we use to solve (CIVP) for every collocation point \(y_{\mathrm {k}}\), \(\mathrm {k}\in \mathcal {K}\). We slightly abuse the notation from (5.9) and write for every physical cell \(I \in \mathcal {T}_n\), \(\mathcal {E}^{det}_{\mathrm {k}}(t_{n},t_{n+1},I):= \Vert R^{st}(y_{\mathrm {k}})\Vert _{L^2((t_n,t_{n+1})\times I)}\), which is the cell-wise indicator for the spatial refinement in \(\varLambda \).

The local physical mesh refinement is achieved by uniformly dividing one cell into two new children cells or merging two cells into one parent cell. To mark elements for refinement we compute the deterministic residual \(\mathcal {E}^{det}_{\mathrm {k}}(t_{n},t_{n+1},I)\) on every cell \(I \in \mathcal {T}_n\) and based on the residual we mark a fixed fraction of the cells for refinement. To coarsen the mesh, we can only merge cells that have the same parent element and both siblings are marked for coarsening. For coarsening we also choose a fixed fraction of all elements according to the local residual \(\mathcal {E}^{det}_{\mathrm {k}}(t_{n},t_{n+1},I)\), cf. [20]. Additionally, each cell is augmented with a variable denoting its current mesh-level which is initially zero. We fix a maximum mesh-level \(L\in \mathbb {N}\), to restrict the fineness of the adaptive mesh and to avoid that the overall numerical error is dominated by the initial discretization error, we start the computations on the finest mesh. The algorithm reads as follows:

figure a

Remark 5.4

After every projection step in line three of Algorithm 1 we apply the TVBM slope limiter \(\varLambda \varPi _h\) from Appendix A.

Following [20] we set the refinement and coarsening fractions to 20% and 10%, respectively. We restrict the maximal refinement level to \(L=3\), since the time step size is linked to the size of the smallest spatial cell (confer (A.2) in the appendix), and allowing for smaller cells would make the time steps infeasibly small. This limitation could be overcome by local time-stepping.

Remark 5.5

Similarly to [20], our choice of the refinement and coarsening fraction is rather ad-hoc, in the sense that our choice provides the best error reduction for the numerical experiments under consideration. For more complex flow problems these parameters certainly have to be adapted to the problem at hand.

Next, we describe the stochastic adaptive algorithm for the ME-SC method from Sect. 4.2 using the stochastic residual \(\mathcal {E}^{stoch}\) as local indicator for stochastic refinement.

figure b

Remark 5.6

A key requirement for a posteriori error estimators, is that the error estimator has the same scaling behavior as the true error. Most of our numerical experiments aim at investigating this property and the space-stochastic splitting properties of the estimator. Controlling the error or deriving adaptation strategies that drive the error estimator to zero are currently infeasible, due to the lack of convergence of the deterministic error estimator post-shock. Therefore, we stick with rather basic adaptive algorithms and our experiments on adaptivity are to be understood as a proof-of-concept trying to show the splitting of the residuals and to demonstrate the usefulness of the residuals in the post-shock case.

6 Numerical examples

In this section we present various numerical examples concerning the scaling properties of the residuals and the performance of the adaptive algorithms. In Sects. 6.1 and 6.3 we examine the scaling properties of \(\mathcal {E}^{det}\) and \(\mathcal {E}^{stoch}\). Sections 6.2, 6.4 and 6.5 assess the efficiency of our proposed adaptive algorithms.

We use the RKDG Code Flexi [21] to solve the determinstic problems at the stochastic collocation points. The DG polynomial degrees will always be one or two and for the time-stepping we use the low storage SSP RK-method of order three as in [22]. The time-reconstruction is also of order three. As numerical fluxes we choose either the Lax–Wendroff numerical flux

$$\begin{aligned} G(u,v):= F(w(u,v)),\quad w(u,v):= \frac{1}{2}\Big ((u+v)+ \frac{\varDelta t}{h}(F(v)-F(u))\Big ), \end{aligned}$$
(6.1)

or the Lax–Friedrichs numerical flux

$$\begin{aligned} G(u,v) := \frac{1}{2}\Big (F(u)+F(v) \Big ) + \lambda (v-u). \end{aligned}$$
(6.2)

In our example, the uncertainty is uniformly distributed. Therefore, we use the zeros of the Gauß–Legendre polynomials as collocation points. Computing \(\mathcal {E}^{det}, \mathcal {E}^{stoch}\) requires computing integrals, we approximate them via Gauß–Legendre quadrature where we use seven points in time, ten points in physical space and ten points in random space, except for Example 6.3, where for the global interpolation the number of quadrature points in random space will be 2q.

In the following experiments we consider as instance of (RIVP) the one-dimensional compressible Euler equations for the flow of an ideal gas, which are given by

$$\begin{aligned}&\partial _t\rho + \partial _xm =0 ,\nonumber \\&\partial _tm + \partial _x\left( \frac{m^2}{\rho } + p\right) =0,\nonumber \\&\partial _tE + \partial _x\left( (E + p) \,\frac{m}{\rho }\right) =0, \end{aligned}$$
(6.3)

where \(\rho \) denotes mass density, m momentum and E energy of the gas. The constitutive law for pressure p reads

$$\begin{aligned} p = (\gamma -1)\left( E - \frac{1}{2}\frac{m^2}{\rho }\right) , \end{aligned}$$

with the adiabatic constant \(\gamma =1.4\) if not specified otherwise. In the following figures we refer to the quantity \(\Vert m(T,\cdot ,\cdot )-m_h^{N_t}(\cdot ,\cdot )\Vert _{L_{w}^{2}(\varXi ;L^2(\varLambda ))}\) at final computational time T as numerical error, unless otherwise stated. We also plot the residuals \(\mathcal {E}^{det}(T)\) and \(\mathcal {E}^{stoch}(T)\) as in (5.9) and (5.10) from the momentum equation.

Remark 6.1

Due to the structure of the flux Jacobian for the Euler equations (6.3),

$$\begin{aligned} DF(u)= \begin{pmatrix} 0 &{}\, 1 &{}\, 0 \\ -0.5(\gamma -3)\frac{m^2}{\rho ^2} &{}\, (3-\gamma )\frac{m}{\rho } &{}\, \gamma -1 \\ -\gamma \frac{Em}{\rho }+ (\gamma -1)\frac{m^3}{\rho ^3} &{}\, \gamma \frac{E}{\rho }- \frac{3}{2}(\gamma -1)\frac{m^2}{\rho ^2} &{}\, \gamma \frac{m}{\rho } \end{pmatrix}, \end{aligned}$$

the first component of the stochastic residual \(R^{stoch}\) from (5.5) vanishes when considering the Euler equations without source term. We therefore use the residuals for the momentum and the energy balance as indicators for our space-stochastic mesh refinements.

6.1 A deterministic problem with smooth solution

In this numerical example, we study the scaling properties of the deterministic residual \(\mathcal {E}^{det}\) from (5.9) under uniform spatial mesh refinement. To this end, we construct a smooth exact solution by introducing an additional source term into the Euler equations. The exact solution reads as follows

$$\begin{aligned} \begin{pmatrix} \rho (t,x,y) \\ m(t,x,y) \\ E(t,x,y) \end{pmatrix}= \begin{pmatrix} 2+ 0.1\cos (4\pi (x-t)) \\ \Big (2+ 0.1\cos (4\pi (x-t)) \Big )\Big (1+0.1\sin (4\pi (x-t))\Big ) \\ \Big (2+ 0.1\cos (4\pi (x-t)) \Big )^2 \end{pmatrix}. \end{aligned}$$
(6.4)

The numerical solution is computed on the domain \(\varLambda =[0,1]_{\mathrm {per}}\) up to \(T=0.5\) and we use the Lax–Wendroff numerical flux (6.1).

In Table 1 we present the numerical error and the residual \(\mathcal {E}^{det}\) from (5.9) for the smooth solution (6.4) for DG polynomial degrees one and two. We can see that the error and the residual converge with the correct order of convergence, which is \(p+1\), where p is the DG polynomial degree.

Table 1 \(L^2\)-error, residual and experimental order of convergence (EOC). Example 6.1

6.2 Deterministic adaptivity: Sod shock tube problem

In this numerical experiment we apply the adaptive spatial mesh refinement from Algorithm 1 to the Sod shock tube problem. The Riemann data for this problem is given by

$$\begin{aligned} \begin{aligned} \rho (t=0,x,y)&= {\left\{ \begin{array}{ll} 1, \qquad &{}x< 0.5 \\ 0.125, \qquad &{}x \geqslant 0.5, \end{array}\right. }\\ m(t=0,x,y)&= 0,\\ E(t=0,x,y)&= {\left\{ \begin{array}{ll} 2.5, \qquad &{}x < 0.5,\\ 0.25, \qquad &{}x\geqslant 0.5. \end{array}\right. } \end{aligned} \end{aligned}$$
Fig. 1
figure 1

Error plot for the deterministic Sod shock tube problem. Example 6.2

The numerical solution is computed on the domain \(\varLambda =[0,1]\) up to \(T=0.2\) using the Lax–Friedrichs flux (6.2) and a DG polynomial degree of two. In this example we use exact boundary conditions. In Fig. 1a we compare the \(L^1(\varLambda )\)- and \(L^2(\varLambda )\)-error at time T between the numerical solution and the exact solution obtained with an exact Riemann solver [3]. We can see that for the same number of spatial cells \(N_s\), the numerical error obtained with the adaptive numerical algorithm is smaller than for the uniform mesh refinement. The adaptive algorithm is also computationally more efficient than the uniform algorithm, which can be seen in the error vs. cpu time plot in Fig. 1b.

Remark 6.2

As discussed in Remark 5.1 (iv), \(R^{det}\) scales with \(\frac{1}{h}\) in the vicinity of shocks and contact discontinuities, i.e., it blows up under spatial mesh refinement in these areas. Thus, if we view the residual as an error indicator, it severely over-estimates the error so that it is to be called “inefficient” in these areas, according to the nomenclature of e.g. [33]. From the point of view of mesh adaptation however, refinement based on \(R^{det}\) leads to a reasonable refinement strategy that yields a considerable improvement in error decay compared to uniform mesh refinement (cf. Fig. 1). In particular, \(R^{det}\) precisely captures the positions of rarefaction waves, contact discontinuities and shocks.

Over-estimating the error at discontinuities leads to maximal refinement at discontinuities and some refinement strategies for hyperbolic conservation laws suggest a maximal refinement close to shocks [30].

6.3 A stochastic problem with smooth solution

In this section we focus on the scaling properties of the stochastic residual for a one- and two-dimensional random space \(\varXi \) and a random flux function.

6.3.1 A one-dimensional random space, q-refinement

We modify the exact solution from Sect. 6.1 in the following way,

$$\begin{aligned} \begin{pmatrix} \rho (t,x,y) \\ m(t,x,y) \\ E(t,x,y) \end{pmatrix}= \begin{pmatrix} 2+ 0.1\cos (4\pi (x-yt)) \\ \Big (2+ 0.1\cos (4\pi (x-yt)) \Big )\Big (1+0.1\sin (4\pi (x-yt))\Big ) \\ \Big (2+ 0.1\cos (4\pi (x-yt)) \Big )^2 \end{pmatrix}. \end{aligned}$$
(6.5)

The numerical solution is computed on \(\varLambda =[0,1]_{\mathrm {per}}\) up to \(T=0.2\), the uncertainty y stems from an uniform distribution, i.e. \(\xi \sim {\mathcal {U}}(0,8)\). We consider three different spatial meshes consisting of \(N_s= 8, 32, 512\) elements, DG polynomial degrees of \(p=1,2\) and we use the Lax–Wendroff numerical flux (6.1). In this numerical example we globally approximate the function (6.5) in \(\varXi \), i.e. we increase the polynomial degree q and consider one ME.

Fig. 2
figure 2

Error plot for stochastic smooth problem. Example 6.3.1

Figure 2 shows the behavior of the error and the spatial, resp. stochastic residual, when we globally interpolate the smooth function (6.5). We see that the stochastic residual \(\mathcal {E}^{stoch}\) exhibits spectral convergence for all three spatial discretizations under consideration. Also, the numerical error exhibits spectral convergence until it starts to stagnate because of the spatial resolution error. This is the correct behavior of the stochastic residual as we are globally increasing the polynomial degree in the random space and, therefore, expect spectral convergence with increasing polynomial degree. We also observe that the exponential convergence of \(\mathcal {E}^{stoch}\) is not altered by a finer or coarser space discretization, even for the very coarse discretization consisting of 8 spatial cells and DG polynomial degree of 1. Moreover, the deterministic residual \(\mathcal {E}^{det}\) is unaffected by the increasing resolution in the random space, which we expect from the residual’s splitting into a space-time and a stochastic part.

6.3.2 Mesh refinement in \(\varXi \) and random flux function

In this example we examine the scaling properties of \(\mathcal {E}^{stoch}\) under mesh refinements for a two-dimensional random space \(\varXi \subset \mathbb {R}^2\). We consider the same smooth function as in Sect. 6.3.1,

$$\begin{aligned} \begin{pmatrix} \rho (t,x,y_1) \\ m(t,x,y_1) \\ E(t,x,y_1) \end{pmatrix}= \begin{pmatrix} 2+ 0.1\cos (4\pi (x-y_1t)) \\ \Big (2+0.1\cos (4\pi (x-y_1t)) \Big )\Big (1+0.1\sin (4\pi (x-y_1t))\Big ) \\ \Big (2+ 0.1\cos (4\pi (x-y_1t)) \Big )^2 \end{pmatrix}. \end{aligned}$$
(6.6)

with \(\xi _1\sim {\mathcal {U}}(0,8)\). Moreover, we consider a random adiabatic constant. We assume that \(\gamma =\xi _2 \sim {\mathcal {U}}(1.4,1.6)\) and thus the flux function is also random. The randomness of the adiabatic-constant corresponds to considering a gas mixture of uncertain composition. The numerical solution is computed on \(\varLambda =[0,1]_{\mathrm {per}}\) up to \(T=0.2\). We consider a fixed spatial mesh consisting of \(N_s= 32\) elements. For the ME-SC method we perform a linear and a quadratic interpolation, i.e. \(q\in \{1,2\}\).

Fig. 3
figure 3

Error plot for stochastic smooth problem. Example 6.3.2

Figure 3 illustrates the behavior of the stochastic residual \(\mathcal {E}^{stoch}\), when we consider a local interpolation, i.e., when we consider the ME method from Sect. 4.2. We observe that for a local linear and quadratic interpolation, i.e. \(q\in \{1,2\}\), the stochastic residual converges approximately with the expected rate of convergence, which is \((q+1)/2\), cf. [35]. Like for the q-refinement in Sect. 6.3.1, the deterministic residual \(\mathcal {E}^{det}\) stays constant, when we increase the number of MEs.

6.4 Stochastic adaptivity: stochastic problem with discontinuous solution

We apply the stochastic adaptive Algorithm 2 without spatial adaptivity to a solution which has a discontinuity in the random variable and compare the results with uniform space-stochastic mesh refinements. We therefore consider the following discontinuous function,

$$\begin{aligned} \begin{pmatrix} \rho (t,x,y_1,y_2) \\ m(t,x,y_1,y_2) \\ E(t,x,y_1,y_2) \end{pmatrix}= \begin{pmatrix} 1+ A(y_1,y_2)\cos (4\pi (x-y_1t)) \\ \Big (1+ A(y_1,y_2)\cos (4\pi (x-y_1t)) \Big )\Big (1+0.1\sin (4\pi (x-y_1t))\Big ) \\ \Big (1+ A(y_1,y_2)\cos (4\pi (x-y_1t)) \Big )^2 \end{pmatrix}, \end{aligned}$$

where

$$\begin{aligned} A(y_1,y_2) ={\left\{ \begin{array}{ll} 0.1, \quad \text { if } y_1^2+y^2\leqslant 0.5^2 \\ 0.2, \quad \text { else } . \end{array}\right. } \end{aligned}$$

is a discontinuous amplitude. For the spatial domain \(\varLambda =[0,1]_{\mathrm {per}}\) we use \(N_s= 32\) elements and a DG polynomial degree of two. The solution is computed up to \(T=0.2\) using the Lax–Wendroff numerical flux (6.1) and for the uncertainty we assume that \(\xi _1, \xi _2\sim \mathcal {U}(0,1)\). For the ME-SC method we consider a linear interpolant, i.e. \(q=1\).

Fig. 4
figure 4

Error plot for discontinuous stochastic problem. Example 6.4

In Fig. 4a we plot the error and the spatial resp. stochastic residual versus the number of MEs and in Fig. 4b we show the error of the uniform and adaptive method versus cpu time. In Fig. 4a we can observe that for the uniform stochastic refinement, both the error and the stochastic residual \(\mathcal {E}^{stoch}\) converge with a rate of approximately 1/4. This is in accordance with what we expect when interpolating a two-dimensional discontinuous function. For the adaptive refinement the error and the residual exhibit a rate of convergence of approximately 1/2. The advantage of the stochastic adaptive algorithm is also reflected in Fig. 4b, where we reach an error reduction in significantly less time compared to uniform refinement.

6.5 Space-stochastic adaptivity: an uncertain initial value problem

Finally, we assess the efficiency of the space-stochastic adaptive algorithm by considering a random Riemann Problem. The initial data for this problem reads as follows

$$\begin{aligned} \begin{aligned} \rho (t=0,x,y)&=1, \\ m(t=0,x,y)&= {\left\{ \begin{array}{ll} y_1, &{} x \leqslant 0.25 \\ y_2, &{}x> 0.25 \text { and } x \leqslant 0.5 \\ y_1, &{}x > 0.5 \\ \end{array}\right. } \\ p(t=0,x,y)&= 1, \\ \end{aligned} \end{aligned}$$
(6.7)

where \(\xi _1,\xi _2 \sim {\mathcal {U}}(-1,1)\) and \(\varLambda =[-0.25,1]\). We compare the space-stochastic adaptive (h-adaptive, \(N_{\varXi }\)-adaptive) Algorithm 2 with stochastically uniform and spatially adaptive refinement (h-adaptive, \(N_{\varXi }\)-uniform) and uniform refinement in physical and stochastic space. For this problem we use the Lax–Friedrichs numerical flux (6.2) and for the uniform spatial mesh we consider \(N_s=512\) spatial elements. As for the Sod Shock Tube problem in Sect. 6.2 we prescribe exact boundary conditions. For the adaptive algorithm we always start on a spatial mesh consisting of \(N_s=512\) elements. The DG polynomial degree is two and we consider a linear interpolation in the random space, i.e. \(q=1\). The solution is computed up to \(T=0.2\). The error is measured in the expected value rather than the \({L_{w}^{2}(\varXi ;L^2(\varLambda ))}\)-norm. Note that we do not have an exact solution at hand for this problem, but due to Jensen’s inequality,

$$\begin{aligned} \Vert \mathbb {E}(u(T,\cdot ,\cdot ))-\mathbb {E}(u_h^{N_t}(\cdot ,\cdot ))\Vert _{L^2(\varLambda )}^2&\leqslant \mathbb {E}\Vert u(T,\cdot ,\cdot )- u_h^{N_t}(\cdot ,\cdot )\Vert _{L^2(\varLambda )}^2 \\&= \Vert u(T,\cdot ,\cdot )-u_h^{N_t}(\cdot ,\cdot )\Vert _{L_{w}^{2}(\varXi ;L^2(\varLambda ))}^2. \nonumber \end{aligned}$$
(6.8)

We approximate the expectation \(\mathbb {E}(u(T,\cdot ,\cdot ))\) with a numerical reference solution on \(N_{\varXi }=10^4\) MEs, a SC polynomial degree of \(q=1\) and each sample is computed on a uniform spatial mesh with \(N_s= 2048\) elements using a DG polynomial degree of two.

In Fig. 5 we show the numerical error as in (6.8) vs. cpu time. We observe that the space-stochastic adaptive algorithm reaches an absolute error in significantly less computational time compared to stochastic uniform mesh refinements. For this example we also observe that for a uniform stochastic refinement, the h-adaptive algorithm only slightly increases the efficiency. The major efficiency gain is due to the stochastic adaptivity. This demonstrates the efficiency of our space-stochastic adaptive algorithm and the usefulness of the residuals in the post-shock case.

Fig. 5
figure 5

Error plot uncertain Riemann problem. Example 6.5

7 Conclusions and outlook

In this work we established the existence and uniqueness of random entropy admissible solutions of one-dimensional random hyperbolic conservation laws. We derived a rigorous a posteriori error estimate for numerical approximations of random entropy admissible solutions, which rely on the Stochastic Collocation method in random space and use the Runge–Kutta Discontinuous Galerkin method for the spatio-temporal discretization. Moreover, based on a splitting of the error estimator into a spatio-temporal and a stochastic part, we formulated a novel residual-based space-stochastic adaptive numerical algorithm. Our numerical experiments confirmed that both residuals are independent of each other and decay with the correct order of convergence. Furthermore, the adaptive numerical scheme based on the a posteriori error estimator yields significant computational gains compared to uniform mesh refinement and to space-time adaptivity only.

Future work will focus on deriving convergent a posteriori error estimators post-shock which will make error control and adaptive schemes driving the numerical error below some prescribed threshold possible. Additionally, we plan to extend the space-time reconstruction to two and three spatial dimensions and we will examine how to combine the a posteriori error estimator with sparse grids to use the estimate for sensitivity analysis for identifying the most important directions for stochastic refinement.