  The discontinuous Galerkin (DG) algorithm is a representative high order
method in Computational Fluid Dynamics (CFD) area which possesses considerable
mathematical advantages such as high resolution, low dissipation, and
dispersion. However, DG is rather computationally intensive to demonstrate
practical engineering problems. This paper discusses the implementation of our
in-house practical DG application in three different programming models, as
well as some optimization techniques, including grid renumbering and mixed
precision to maximize the performance improvements in a single node system. The
experiment on CPU and GPU shows that our CUDA, OpenACC, and OpenMP-based code
obtains a maximum speedup of 42.9x, 35.3x, and 8.1x compared with serial
execution by the original application, respectively. Besides, we systematically
compare the programming models in two aspects: performance and productivity.
Our empirical conclusions facilitate the programmers to select the right
platform with a suitable programming model according to their target
applications.
