# Discontinuos Galerkin Method - inhomogeneous advection problem

I'm currently trying to get into this topic. I've learned that the basic scheme for the advection problem ($D_{x}u+a*D_{t}u=0$) can be solved in a scheme like $$M^{k}\frac{d}{dt}u^{k}_{h}-(S^{k})^{T}au^{k}_{h}=-(au_{h})^{*}\psi(x^{k}_{r})+(au_{h})^{*}\psi(x^{k}_{l})$$Here, we have $$M^{k}_{ij}=(\psi_{i},\psi_{j}), S^{k}_{ij}=(\psi_{i},\frac{d\psi_{j}}{dx})$$ $\psi_{i}$ are the basis functions.
I think I understand this scheme but I'm not quite how to deal with the case of an inhomogeneous PDE.
How has the scheme to be modified if I've got $f(x,t)$ instead of 0 above?

• You multiply the right hand side by a test function and integrate the product over the domain. It results in another term on the right hand side of the discrete equation. – Wolfgang Bangerth Apr 25 '17 at 2:00
• As the test functions and the basis functions are in the same space for the DG-Methods, wouldn't this result in an extra term $M^{k}f^{k}(x,t)$? – NG2207 Apr 25 '17 at 6:01
• A $M^k f^k$ term would imply that you're evaluating the forcing function at the nodes and then interpolating to the quadrature points. This is fine for source terms that your shape functions can interpolate accurately, but in general, it is better to simply evaluate the function at the quadrature points if you have the function available to you. The difference likely won't be huge either way, but it's worth bearing in mind. – Tyler Olsen Apr 25 '17 at 11:18
• I would recommend you just think this through for a simple problem such as the Laplace equation. If you understand it there, it will be obvious how to do it here. – Wolfgang Bangerth Apr 25 '17 at 13:02
• Always safer to start from Poisson problems as written by Wolfgang. I recommend Beatrice Riviere's book. Best – uli.xu Apr 27 '17 at 17:05