implement a limiter in c++

More
6 years 3 months ago #673 by Guosheng Fu
Hi guys,

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
link.springer.com/content/pdf/10.1007/s10915-011-9472-8.pdf

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.

Best,
Guosheng
Attachments:
More
6 years 3 months ago #675 by joachim
Replied by joachim on topic implement a limiter in c++
Hi Guosheng,

yes you are right, working with shape functions in Python is extremely slow.

the best start into NGSolve C++-programming are the MyLittleNGSolve tutorials from here:

github.com/NGSolve/mylittlengsolve

start with 1_Basic.

the one best suited for you is 3_Legacy, linhypDG.cpp, where a DG time-stepping is implemented.

best, Joachim
Time to create page: 0.092 seconds