# How is nonlinear flux interface term assembled for Discontinuous Galerkin method for hyperbolic conservation laws?

For example, for 1D Burgers equation

$$u u_x = 0 \\$$

equivalently,

$$\frac{dF(u)}{dx} = 0\\ F(u)= \frac{u^2}{2}$$

If I want to obtain $A_{ij},i\ne j$ for two DOFs ($U_i$ and $U_j$) of two elements ($E_0$ and $E_1$) sharing an internal interface $\Gamma_0$.

I need to substitute $u =\phi_i$ and $v=\phi_j$ to nonlinear-linear form \begin{aligned} a(u;v) &= \int_{\Omega}{\nabla F(u)\cdot \nabla v dx} - \int_{\Gamma_0}{[F(u) v]dS} \\&=\int_{\Omega}{\nabla F(u)\cdot \nabla v dx} - \int_{\Gamma_0}{\tilde F(u^+,u^-) [v]dS} \end{aligned}

I understand what $F(u)$ or $\tilde F(u^+,u^-)$ are in the sense of fluid mechanics and conservation laws. But I am really confusing what $F(\phi_i)$ or $\tilde F(\phi_i^+,\phi_j^-)$ is in the sense of physics and how it is integrated. They are so unnatural.

I can read the program codes, but they are all using certain iterations over elements rather than iteration over basis functions. They are indeed correct but I am not sure they are correct for certain $A_{ij},i\ne j$.

$$\tilde F(u^+,u^-) = \tilde F((u+\phi_i)^+,(u+\phi_i)^-)$$ and $$\int_{\Gamma_0}\tilde F(u^+,u^-)[[v]]dx = \int_{\Gamma_0}\tilde F((u+\phi_i)^+,(u+\phi_i)^-)[[v]]dx \\ = \int_{\Gamma_0}\left( \tilde F(u^+,u^-)+ \tilde F^{(1)}(u^+,u^-)\phi_i^+ + \tilde F^{(2)}(u^+,u^-)\phi_i^- \right) (\phi_j^+-\phi_j^-)dx$$
Now, the integration is represented as $a(\phi_i,\phi_j)+L(\phi_j)$ and can be assembled in a native way.