I am playing with DG methods for compressible flow.
As a first step, to make the code work, I am implementing the positivity-preserving limiter of Zhang and Shu
For this limiter, I need to loop over the elements, and access grid function’s cell-average and its evaluation at certain quadrature points, and modify the high-order d.o.fs properly to avoid negativity.
In the attached file, I am solving the double mach reflection problem, the pp limiter is naively implemented in python, which is very slow.
I am hoping a c++ implementation of the loop will speed-up the code, but do not have a clear idea how to proceed, given my limited c++ experience. Any suggestion is welcome.