With DG simulations and their higher-order spatial discretization, the time-stepping method should
be of a similar (higher-)order. To determine the framework requirements, we selected the explicit
Runge-Kutta (RK) method. Considering the demands and algorithms shown in Section 2.14, RK
methods require storing conserved quantities at particular points in time to V i and their
corresponding derivative Di. Computing RK time step updates can then be achieved by additional
stacks SV 0 for V 0 and SDi for Di computed in each stage [BBSV10]. For an explicit RKn method
assuring accuracy up to n-th order with V 1 := V 0 due to ak,k = 0, we compute each stage i ∈{1,…,n}
with the following algorithm:
Algorithm: RK time stepping
Before iterating over the RK stages, the cell data SfsimCellData at the current time step is copied
to SV 0.
For i in (1,…,n) do:
Finally the time step is computed with
Since we use pointers to mark the beginning of the stack for both push and pop operations, it is not necessary to copy stack data when assigning e.g. V 0 := U. Instead of copying the entire stack, we can efficiently swap the stack pointers.