A scalar
hyperbolic conservation law is of the form : \begin{align} \partial_t u + \partial_x f(u) &= 0 \quad \text{for} \quad t>0,\, x\in \R \\ u(0,x) &= u_0(x)\,, \end{align} where one tries to solve for the unknown scalar function u \equiv u(t,x) , and the functions f,u_0 are typically given.
Space discretization The x -space will be discretized as : \R = \bigcup_k I_k \,, \quad I_k := \left( x_k, x_{k+1} \right) \quad \text{for} \quad x_k Furthermore, we need the following definitions : h_k := | I_k | \,, \quad h := \sup_k h_k \,, \quad \hat{x}_k := x_k + \frac{h_k}{2}\,.
Basis for function space We derive the basis representation for the function space of our solution u . The function space is defined as : S_h^p := \left\lbrace v \in L^2(\R) : v\Big|_{I_k} \in \Pi_p \right\rbrace \quad \text{for} \quad p \in \N_0 \,, where {v|}_{I_k} denotes the
restriction of v onto the interval I_k , and \Pi_p denotes the space of polynomials of maximal
degree p . The index h should show the relation to an underlying discretization given by \left(x_k\right)_k . Note here that v is not uniquely defined at the intersection points (x_k)_k . At first we make use of a specific polynomial basis on the interval [-1,1] , the
Legendre polynomials (P_n)_{n\in\N_0} , i.e., : P_0(x) = 1 \,,\quad P_1(x)=x \,,\quad P_2(x) = \frac{1}{2} (3x^2-1) \,,\quad \dots Note especially the orthogonality relations : \left\langle P_i,P_j \right\rangle_{L^2([-1,1])} = \frac{2}{2i+1} \delta_{ij} \quad \forall \, i,j \in \N_0 \,. Transformation onto the interval [0,1] , and normalization is achieved by functions (\varphi_i)_i : \varphi_i (x) := \sqrt{2i+1} P_i(2x-1) \quad \text{for} \quad x\in [0,1]\,, which fulfill the orthonormality relation : \left\langle \varphi_i,\varphi_j \right\rangle_{L^2([0,1])} = \delta_{ij} \quad \forall \, i,j \in \N_0 \,. Transformation onto an interval I_k is given by \left( \bar{\varphi}_{ki}\right)_i : \bar{\varphi}_{ki} := \frac{1}{\sqrt{h_k}} \varphi_i \left( \frac{x-x_k}{h_k} \right) \quad \text{for} \quad x\in I_k\,, which fulfill : \left\langle \bar{\varphi}_{ki},\bar{\varphi}_{kj} \right\rangle_{L^2(I_k)} = \delta_{ij} \quad \forall \, i,j \in \N_0 \forall \, k \,. For L^\infty -normalization we define \varphi_{ki}:= \sqrt{h_k} \bar{\varphi}_{ki} , and for L^1 -normalization we define \tilde{\varphi}_{ki}:= \frac{1}{\sqrt{h_k}} \bar{\varphi}_{ki} , s.t. : \| \varphi_{ki} \|_{L^\infty (I_k) } = \| \varphi_i \|_{L^\infty ([0,1]) } =: c_{i,\infty} \quad \text{and} \quad \| \tilde{\varphi}_{ki} \|_{L^1 (I_k) } = \| \varphi_i \|_{L^1 ([0,1]) } =: c_{i,1} \,. Finally, we can define the basis representation of our solutions u_h : \begin{align} u_h(t,x) :=& \sum_{i=0}^p u_{ki}(t) \varphi_{ki} (x) \quad \text{for} \quad x \in (x_k,x_{k+1}) \\ u_{ki} (t) =& \left\langle u_h(t, \cdot ),\tilde{\varphi}_{ki} \right\rangle_{L^2(I_k)} \,. \end{align} Note here, that u_h is not defined at the interface positions. Besides, prism bases are employed for planar-like structures, and are capable for 2-D/3-D hybridation.
DG-scheme The conservation law is transformed into its weak form by multiplying with test functions, and integration over test intervals : \begin{align} \partial_t u + \partial_x f(u) &= 0 \\ \Rightarrow \quad \left\langle \partial_t u , v \right\rangle_{L^2(I_k)} + \left\langle \partial_x f(u) , v \right\rangle_{L^2(I_k)} &= 0 \quad \text{for} \quad \forall \, v \in S_h^p \\ \Leftrightarrow \quad \left\langle \partial_t u , \tilde{\varphi}_{ki} \right\rangle_{L^2(I_k)} + \left\langle \partial_x f(u) , \tilde{\varphi}_{ki} \right\rangle_{L^2(I_k)} &= 0 \quad \text{for} \quad \forall \, k \; \forall\, i \leq p \,. \end{align} By using partial integration one is left with : \begin{align} \frac{\mathrm d}{\mathrm d t} u_{ki}(t) + f(u(t, x_{k+1} )) \tilde{\varphi}_{ki}(x_{k+1}) - f(u(t, x_k )) \tilde{\varphi}_{ki}(x_k) - \left\langle f(u(t,\,\cdot\,)) , \tilde{\varphi}_{ki}' \right\rangle_{L^2(I_k)} =0 \quad \text{for} \quad \forall \, k \; \forall\, i \leq p \,. \end{align} The fluxes at the interfaces are approximated by numerical fluxes g with : g_k := g(u_k^-,u_k^+) \,, \quad u_k^\pm := u(t,x_k^\pm) \,, where u_k^{\pm} denotes the left- and right-hand sided limits. Finally, the
DG-Scheme can be written as : \begin{align} \frac{\mathrm d}{\mathrm d t} u_{ki}(t) + g_{k+1} \tilde{\varphi}_{ki}(x_{k+1}) - g_k \tilde{\varphi}_{ki}(x_k) - \left\langle f(u(t,\,\cdot\,)) , \tilde{\varphi}_{ki}' \right\rangle_{L^2(I_k)} =0 \quad \text{for} \quad \forall \, k \; \forall\, i \leq p \,. \end{align} == Scalar elliptic equation ==