Abstract
We propose a padaptive quadraturefree discontinuous Galerkin method for the shallow water equations based on a computationally efficient adaptivity indicator which works without any problemdependent parameters. The error and smoothness of the solution are detected using the information collected for slope limiting and, for piecewise constant discretizations, by carrying out a reconstruction procedure. The accuracy and robustness of the new scheme are evaluated using several benchmarks and compared to other adaptivity indicators. Our results indicate that the proposed indicator finds a good balance between solution quality and computational overhead.
Similar content being viewed by others
1 Introduction
Discontinuous Galerkin (DG) methods combine some of the most attractive features of the classical (continuous) finite element and finite volume methods; they are widely used nowadays in many areas of computational science, particularly for fluid dynamics simulation. Thanks to local approximation stencils, DG schemes have a very favorable computation/communication ratio and are therefore well suited for high performance computing applications that utilize distributed memory parallelization or heterogeneous hardware architectures.
One of the most interesting aspects of the DG methodology is the support for the computational mesh (h) or the local approximation space (p) adaptivity. However, adaptive discretizations need indicators to guide the refinement/derefinenement. A wide variety of different error and smoothness indicators exists in the literature (see, for example, an overview in Naddei et al. 2019). Generally, these approaches can be subdivided into several classes according to the information used to evaluate the local discretization error (or the local solution regularity). A simple and computationally efficient scheme (Eskilsson 2011; Tumolo et al. 2013) measures the socalled local spectral decay of the DG solution, i.e., compares the absolute or relative magnitudes of the degrees of freedom corresponding to different polynomial orders. Another indicator, which has been already successfully used for the shallow water equations (SWE), estimates local solution gradients (Kubatko et al. 2009; Michoski et al. 2011). In Michoski et al. (2011), the first attempt was made to combine a slope limiter with a padaptive DG method; however, contrary to our approach, no slope limiting information was utilized by the adaptivity procedure and vice versa.
Our indicator uses techniques introduced in Krivodonova et al. (2004) for socalled nonconformity estimators which measure the absolute or relative size of discontinuity between the elementlocal solutions – mostly by integrating solution jumps over the interelement boundaries. However, a new indicator became necessary due to additional requirements resulting from the specifics of our application:

Highly dynamic character of typical simulation scenarios for the SWE (e.g., tidal waves or tsunamis) requires a computationally efficient procedure,

Support for piecewise constant polynomial spaces – the indicator must be able to detect local errors using the lowest order approximation space—cannot be provided using, e.g., the spectral decay methods.
The adaptivity indicator proposed in this work aims to fulfill the above requirements, does not need any problemspecific (e.g. sensitivity) parameters, and is integrated into the vertexbased slope limiter (Aizinger 2011; Kuzmin 2010; Aizinger et al. 2017; Hajduk et al. 2018, 2019) further reducing the total computational cost of the scheme. In addition, our DG discretization based on modal hierarchical bases is highly suited for padaptive schemes – even more so since it relies on a quadraturefree formulation introduced in FaghihNaini et al. (2020). Analytic evaluation of all element and edge integrals completely avoids the main overhead of varyingorder approximation spaces: The necessity to use the most accurate (and thus the most expensive) quadrature rule or to maintain several quadrature rules of different orders.
We begin, in the next section, by introducing the mathematical model and its discretization by a quadraturefree DG method. Section 3 details our adaptivity indicator and two other indicators used for comparison. Numerical results evaluating the performance of our scheme are presented in Sect. 4 followed by a short Conclusions and outlook section.
2 Quadraturefree DG formulation for the shallow water equations
2.1 Governing equations
The presentation in this section closely follows (FaghihNaini et al. 2020) and is included here for completeness. We start with the classical 2D shallow water equations defined on some 2D domain \(\varOmega \) and given by
where \(\xi \) represents the elevation of the free water surface with respect to some datum (e.g., the mean sea level). Using \(h_b\) to denote the bathymetric depth, \(H = h_b + \xi \) is then the total water depth. \(\varvec{q} := (U,V)^T\) denotes the depth integrated horizontal velocity field, \(f_c\) the Coriolis coefficient, g the gravitational acceleration, \(\tau _{\text {bf}}\) the bottom friction coefficient, and \(\varvec{F}\) the body force accounting for the variable atmospheric pressure and tidal potential.
Introducing the notation \(\varvec{c} := (\xi , U,V)^T\), system (1), (2) can be reformulated in the following compact form:
where
Taking into account the relation \(\varvec{q} = \varvec{u}H\), where \(\varvec{u}=(u,v)^T\) is the depth averaged velocity, system (3) can be reformulated as follows:
where
With the help of the auxiliary vector \(\varvec{u}\) calculated diagnostically from (5), this formulation, first presented in FaghihNaini et al. (2020), avoids fractiontype nonlinearities in the momentum equation (2) and is better suited for quadraturefree integration.
This work uses the following types of boundary conditions for the SWE:
Land boundary: At a land boundary, we assume no normal flow
Opensea boundary: Denoting by \(\hat{\xi }\) the prescribed free surface elevation we set at open sea boundaries
River boundary: For supercritical flow examples, we set the following river (inflow) boundary conditions:
with the normal and tangential integrated velocities \( \hat{q}_{\varvec{n}}(t, \varvec{x})\) and \( \hat{q}_{\varvec{\tau }}(t, \varvec{x})\).
Radiation boundary: At the outflow boundary of supercritical flow examples, we specify radiation boundary conditions where no unknowns are prescribed.
Lastly, we provide initial conditions for the elevation and integrated velocity
2.2 Spatial discretization by a quadraturefree DG method
For \(\{\mathcal {T}_\varDelta \}_{\varDelta >0}\), a family of triangulations of \(\varOmega \subset \mathbb {R}^2\), let \(\varOmega _e\) be an element of \(\mathcal {T}_\varDelta \). The variational formulation of system (4), (5) is obtained by multiplication with sufficiently smooth test functions \(\varvec{\phi }\) and \(\varvec{\psi }\) followed by the integration by parts on each element \(\varOmega _e \in \mathcal {T}_\varDelta \) (we use the standard notation \((\cdot ,\cdot )_{\varOmega _e}\) and \(\langle \cdot ,\cdot \rangle _{\partial \varOmega _e}\) for the \(L^2\)scalar products on elements and edges, respectively)
where \(\varvec{n}_e\) denotes an exterior unit normal to \(\partial \varOmega _e\).
Denoting by \(\mathbb {P}^p(\varOmega _e)\) the polynomial space of order (i.e. the highest polynomial degree) p on \(\varOmega _e\), the initial conditions for the semidiscrete problem are generated using an \(L^2\)projection of (7) into the corresponding discrete space. The (local) semidiscrete formulation is then obtained from (8), (9) by replacing \(\varvec{c}\) and \(\varvec{u}\) by their finitelydimensional counterparts \(\varvec{c}_\varDelta , \varvec{u}_\varDelta \) and utilizing test functions \(\varvec{\phi }_\varDelta \in \mathbb {P}^p(\varOmega _e)^3, \, \varvec{\psi }_\varDelta \in \mathbb {P}^p(\varOmega _e)^2\):
The edge flux \(\varvec{{A}}(\varvec{c}_\varDelta , \varvec{u}_\varDelta ) \cdot \varvec{n}_e\) is approximated on \(\partial \varOmega _e\) by a numerical flux \(\varvec{\widehat{A}}(\varvec{c}_\varDelta , \varvec{u}_\varDelta ,\varvec{\tilde{c}}_\varDelta , \varvec{\tilde{u}}_\varDelta , \varvec{n}_e)\) that depends on discontinuous values of the solution on element \(\varOmega _e\) (without tilde) and on its edge neighbors (with tilde). On exterior domain boundaries, the specified boundary values of the elevation and velocity are utilized in the flux computation. In this work, we rely – unless specified otherwise – on the Lax–Friedrichs flux (Hajduk et al. 2018) defined as
where \(\lambda \) denotes the largest (in absolute value) eigenvalue of \(\frac{\partial }{\partial \varvec{c}} \varvec{\widetilde{A}}(\varvec{c}) \cdot \varvec{n}_e\). Denoting by \(\varvec{x}_f\) the midpoint of edge \(f \subset \partial \varOmega _e\), our quadraturefree scheme uses the following approximation of \(\lambda _f\):
Since the Lax–Friedrichs flux sometimes leads to rather diffusive results, we use in some cases the FORCE flux (Toro et al. 2009) instead with \(\lambda \) as described above. The FORCE flux can be constructed as the arithmetic mean between the Lax–Friedrichs flux and the twostep version of the Lax–Wendroff flux
where the latter is defined as \(\varvec{\widehat{A}}^{LW} = \varvec{{A}}\left( \varvec{Q}^{LW}\right) \) with
Since the FORCE flux is more computationally expensive, it is only used if the Lax–Friedrichs flux produces too much numerical diffusion. Note that with either Lax–Friedrichs or FORCE flux and the parameter \(\lambda \) approximated as in (12), our semidiscrete formulation (10), (11) only contains nonlinearities in product form, thus all edge integrals are well suited for an analytical integration using a quadraturefree approach.
For simplicity, we formulate our methodology in the remainder of this section and in Sect. 3 for a generic scalar function \(w(\varvec{x})\) defined on \(\varOmega \) and its discretized counterpart \(w_{\varDelta }(\varvec{x})\). Given \(\varphi _{ei}(\varvec{x}), \,i=1, \ldots , P(p)\), a basis of \(\mathbb {P}^p(\varOmega _e)\), \(w_\varDelta \) can be represented as
that is, the superscript indicates the approximation order; no superscript means the default (full) approximation order. We also use a shorthand notation \(p0, p1, \ldots \) for piecewise constant, linear, \(\ldots \) approximation spaces. The number of basis functions P(p) depends on the respective polynomial order and the space dimension; it has the following values in \(\mathbb {R}^2\): \(P(0)\!=\!1, \, P(1)\!=\!3,\) and \(P(2)\!=\!6\). The basis functions used in this work are chosen to be orthonormal with respect to the \(L^2\)scalar product on \(\varOmega _e\) (see, for example, Frank et al. 2015).
2.3 Temporal discretization and slope limiting
To avoid spurious oscillations in linear and superlinear DG solutions, we apply a vertexbased slope limiter following (Aizinger 2011; Kuzmin 2010) to piecewise linear and higher order approximations where appropriate. For orthonormal basis functions used in our work, the local representation of the limiting operator \(\varPi : \mathbb {P}^p(\varOmega _e) \rightarrow \mathbb {P}^p(\varOmega _e)\) can be given by
where the limiting factor \(\alpha _e \in [0,1]\) is computed as follows:
choosing \(\varepsilon = 10^{5}\) in the following. \(w_i^{\text {max}}\) and \(w_i^{\text {min}}\) denote the solution bounds given by the maximum and minimum of piecewise constant solutions \(w_e^0\) on all elements sharing vertex \(\varvec{a}_{ei}\). Note that for an orthonormal basis, one has
If (15) results in \(\alpha _e<1\), all degrees of freedom corresponding to superlinear (quadratic and higher) basis functions in (14) are set to zero. In such cases, this limiting does not guarantee the exact preservation of bounds \(w_i^{\text {max}}\) and \(w_i^{\text {min}}\), but the solution is mostly oscillationfree in most practical scenarios.
The temporal discretization of system (10), (11) is performed using a SSP (strong stability preserving) Runge–Kutta method (Gottlieb and Shu 1998). Following the presentation in Reuter et al. (2016), let \(0 = t_1< t_2< \cdots < t_{\text {end}}\) be a not necessarily equidistant decomposition of the time interval and \(\varDelta _n t := t_{n+1}t_n\) the size of the nth time step. The update scheme of the sstage SSP Rung–Kutta method (including limiting) is then given by
where \(\varvec{L}\) denotes the spatial discretization operator specified by (10), (11). In the test cases presented in Sect. 4, we use a twostage SSP Runge–Kutta method with the coefficients \(\omega _1=0,\, \omega _2 = 1/2,\, \delta _1 = 0,\, \delta _2 = 1\) (cf. Eq. (2.4) (Gottlieb and Shu 1998).
3 Adaptivity indicators
3.1 Design of a new parameterfree adaptivity indicator
The goal of the new indicator, which will be referred to as JRL (JumpReconstructionLimiting), is to identify resolved and underresolved solution parts while distinguishing between smooth and nonsmooth regions (e.g., shocks). Nonconstant smooth regions should be approximated by piecewise linear or quadratic polynomials, constant regions should automatically revert to constant approximations. In regions with shocks or discontinuities, over and undershoots should be avoided either by limiting, where possible, or by reducing the approximation order where necessary. Among the existing techniques in this area particularly relevant for our approach are the following ones:

for continuous finite element methods, (Kuzmin and Schieweck 2013) utilized a gradient reconstruction (using a local \(L^2\)projection) as a parameterfree smoothness indicator for the unsteady linear advection equation;

(Aizinger et al. 2017) introduced a fluxbased gradient reconstruction which was then employed in the framework of anisotropic slope limiters for the DG method.
The indicator’s scheme is shown in Fig. 1; it combines the above two ideas with a vertexbased slope limiter to reuse precomputed data in an effort to increase computational efficiency and to smoothly blend padaptivity with slope limiting. The following subsections detail indicator’s working principles.
3.1.1 Error detection
First, we need to introduce some notation. For the base approximation order \(b:=\max {\{p1,0\}}\), the jump of element \(\varOmega _e\) is defined as
where \(\tilde{e}\) denotes the index of the edgeneighbor of element \(\varOmega _e\). The base jump of element \(\varOmega _e\) is the jump when using the base order approximation on \(\varOmega _e\)
It is mainly used in combination with \(\llbracket w\rrbracket _{e}\) to estimate the solution regularity. In the numerical results section (Sect. 4), the adaptivity indicator as shown in Fig. 1 is applied to the free surface elevation, that is, \(w=\xi \). The decisions are made depending on the following thresholds: \(\varepsilon _0=0.01\), \(\varepsilon _1=0.005\), \(\varepsilon _2=0.001\) and \(\tilde{\varepsilon }_{1}=0.01\), which are problem independent and remain constant for all test cases and resolutions.
Furthermore, to avoid frequent in and decrements in the local approximation order, we add an additional constraint: once the order is increased, it cannot be decreased for a fixed number of time steps chosen equal to 10 in all our test cases. Additionally, the approximation order of an element can only be increased by one at a time. This explains why the jump definition in (16) is somewhat different from the standard jump definition (cf. (20) in Sect. 3.2.1) where a full order approximation is considered. Our approach is independent of the decisions on approximation order in and decrements involving neighboring elements—since we only permit changes by one polynomial order.
3.1.2 Gradient reconstruction
For a p0 solution \(w^0_\varDelta (t,\varvec{x})\) with \(\frac{\llbracket w^0\rrbracket _{e}}{\partial \varOmega _e}\le 0.01\cdot w^0_e\), we construct a linear solution as follows using a rotationally invariant gradient reconstruction
This reconstruction uses the linear Taylor basis functions \(\psi _{ei}\) as in Eq. (6) of (Kuzmin 2010) defined on the element \(\varOmega _e\) as
where \(\varvec{x}_e^c=(x_e^c, y_e^c)^T=\frac{1}{3} \left( \varvec{a}_{e1} + \varvec{a}_{e2} +\varvec{a}_{e3}\right) \) denotes the centroid of \(\varOmega _e\). The first coefficient is just the mean of the solution, the other two are obtained by taking the directional derivatives on all edges. Consider \(\varOmega _{\tilde{e}}\) with centroid \(\varvec{\tilde{x}}^c=(\tilde{x}^c, \tilde{y}^c)\) sharing an edge with \(\varOmega _e\). The directional derivative of \(w_e\) on \(\partial \varOmega _{e}\cap \partial \varOmega _{\tilde{e}}\) in direction \(\varvec{d}_{\tilde{e}} = \varvec{x}_{\tilde{e}}^c  \varvec{x}_e^c\) can then be approximated by
After computing the directional derivatives, we solve a least squares problem to obtain the gradient. Let N be the matrix containing the directions \(\varvec{d}_{\tilde{e}}\) in its rows, and let \(\varvec{\nu }_{e}\) be the vector of directional derivatives defined in (18) for all neighboring elements \(\varOmega _{\tilde{e}}\). The missing coefficients from (17) are then obtained as the solution of the least squares problem:
Finally, the solution is transformed back into the orthonormal basis. For elements at the boundary of \(\varOmega \), one can define the directional derivatives using a ghost layer. The above approach trivially generalizes to arbitrary polygons.
3.2 Two further indicators for comparison
To evaluate the performance of our new indicator, we perform in Sect. 4 comparisons to two other types of adaptivity indicators. The first one, described in Sect. 3.2.1, is a well established scheme which uses interelement jumps to assess the local solution regularity. The other one, described in Sect. 3.2.2, is our own version of the gradient indicator enhanced in order to be applicable for p0 discretizations. It needs to be noted here that these two indicators need either one (cf. Sect. 3.2.1) or three (cf. Sect. 3.2.2) userdefined thresholds as input parameters. These parameters have to be calibrated manually and may differ for different scenarios, for limited and unlimited simulations as well as for different refinement levels of the same scenario.
3.2.1 Jump indicator
The indicator introduced in Remacle et al. (2003) computes the sum of the jumps across the edges of an element \(\varOmega _e\), in our notation as
The local approximation order is then increased if the total jump over the element is greater than the userprovided threshold, and a decrease is performed if it is smaller (also here the minimum of ten time steps between an increase and a decrease is enforced). This indicator can be considered as a simplified version of the JRL indicator since it also uses jumps for error detection. We apply it to the free surface elevation, that is set \(w=\xi \), and refer to it in the following as JE (JumpEstimation).
3.2.2 Gradient indicator
There exist gradient indicators in the literature such as the one introduced in Burbeau and Sagaut (2005) for the compressible NavierStokes equations and employed for the SWE in Kubatko et al. (2009). It computes gradients using the elementlocal solutions and therefore cannot be applied to p0discretizations. To address this deficiency we designed a new scheme by taking directional derivatives in the directions \(\varvec{d}_f = \varvec{x}_f  \varvec{x}_e^c\), where \(\varvec{x}_f\) denotes the midpoint of edge \(f \subset \partial \varOmega _e\). The directional derivative is then approximated using the element centroid value and the edge midpoint values taken from the current element and from its edge neighbor as follows
To decide, whether an increment in the approximation order is necessary, comparison is done by evaluating
where \(\varDelta _e =\sqrt{2 \varOmega _e}\). In our implementation, this indicator is applied to three primary unknowns, that is, \(w \in \{\xi , U, V\}\), in the following way. If the inequality does not hold for all directions and all three unknowns, the local approximation order of the respective element is increased. If all of them hold, the same comparison (21) is performed for the base order solution \(w^{b}_{e}\) (see Sect. 3.1.1) on the current element and using \((\varDelta _e)^b\) in the upper bound in (21). If the criterion still holds for \(w^{b}_{e}\), then the solution is approximated well enough by the lower order approximation, thus the order is decreased. The threshold \(\varepsilon _w\) has to be chosen individually for every unknown and scenario but can be chosen the same for different mesh resolutions. We refer to this indicator as the GRE (GradientReconstructionExtended).
4 Numerical results
To evaluate the accuracy and robustness of the proposed adaptivity indicator, we use three different benchmarks representing a wide range of spatial (constant, smoothly varying, shocks) and temporal (stationary, timevarying) flow regimes. In addition to our indicator, simulations utilizing two other indicators described in Sect. 3.2 were carried out and used for comparison purposes.
The simulations were performed with the ExaStencils code generation framework (Lengauer et al. 2020), which is based on the domainspecific language ExaSlang (Schmitt et al. 2014b) and outputs an optimized C++ or CUDA code. Our work extends the framework using a Python frontend – called GHODDESS and available at https://i10git.cs.fau.de/ocean/ghoddessrelease – responsible for mapping the DG scheme to ExaSlang (FaghihNaini et al. 2020). Recently, much effort was put into improving the performance of our padaptive scheme via algorithmic optimizations and various hybridization strategies controlling the distribution of the compute kernels between CPUs and GPUs. Runs on different architectures showed a speedup compared to a pure CPU or GPU implementation (see FaghihNaini et al. 2023).
Note that no bottom friction \(\tau _{\text {bf}}\), Coriolis force \(f_c\), or forcing \(\varvec{F}\) is used in any of the following test examples (cf. (2)).
4.1 Radial dam break
The radial dam break example is based on (LeVeque 2002; Hajduk 2021). We set \(\varOmega = [0,5]\times [0,5]\), \(g=1\), and a constant bathymetry \(h_b =0\). To make the test problem better suited for a padaptive approach, we chose the initial condition as
The simulation results shown in Fig. 2 (top and middle) were obtained on a uniform mesh with 32 768 triangles, whereas those displayed in Fig. 2 (bottom) used the same mesh refined twice in a uniform fashion. The latter solution serves as a reference for our comparisons and, in order to reduce numerical diffusion, employs the FORCE (see (13)) instead of the Lax–Friedrichs flux. Since all external boundaries use land boundary conditions, the wave is reflected as illustrated in Fig. 2 (right) which correspond to \(t=3\,s\). For better comparability, we limit the free surface elevation for the nonadaptive cases and show limited and unlimited results for the adaptive ones.
A comparison between the padaptive solutions with different indicators is shown in Fig. 3(a) for \(t=0.1\,\)s, in Fig. 3(b) for \(t=1\,\)s, and in Fig. 3(c) for \(t=3\,\)s, respectively. For indicator JE, a threshold value of 0.0003 led to the best results. For indicator GRE, in the unlimited case, the threshold for the free surface elevation of 0.8 and for the velocities of 1.7, and, in the limited case, the threshold for the free surface elevation of 0.2 and for the velocities of 0.5 produced the best solution. Our new indicator avoids over and undershoots while not suffering from excessive numerical diffusion such as shown by the JE indicator with and without limiting. The GRE indicator produces a reasonable solution if limiting is active; otherwise, it is very diffusive and leads to over and undershoots.
These findings are further corroborated by the difference plots for the free surface elevation \(\xi \xi _{ref}\) shown in Fig. 4 and the \(L^1\)errors with respect to the reference solution listed in Table 1 alongside the fraction of elements with a specific order and the number of degrees of freedom. For \(t=0.1\,\mathrm {s}\) in the adaptive cases, more than 93 % of the elements are approximated by order 0, and only between 35 % and 40 % of the degrees of freedom of the linear approximation are needed to reach comparable \(L^1\)errors. For \(t=1\,\mathrm {s}\), in order to reach a comparable \(L^1\)error, one needs up to approx. 61 % of degrees of freedom of the uniformly linear approximation for p01 and up to approx. 82 % of degrees of freedom for p02. Here, a significant amount of p1 elements is necessary to represent the curvature correctly. For \(t=3\,\mathrm {s}\), the distribution of the approximation order is somewhat more dependent on the resolution, i.e., for higher resolutions, the fraction of lower order elements is higher and vice versa. Yet even in the worst case only approx. 81 % of the degrees of freedom compared to the uniform higher order approximation are needed. The highest resolution solution suffers from excessive numerical diffusion for orders 0 and 1 which can be remedied for order 1 by using the FORCE flux.
4.2 Supercritical flow in a constricted channel
In our next benchmark, we consider a supercritical flow in a constricted channel (constriction angle of 5 degrees) with constant bathymetry based on the configuration proposed in Zienkiewicz and Ortiz (1995). Flow is induced through the inflow (bottom) boundary and there is no flow through the left and right boundaries, whereas the radiation boundary conditions are specified at the outflow (upper) boundary. Denoting by \(u_i\) and \(H_i\) the axial velocity and water depth at the inlet, respectively, the inlet Froude number \(\text {Fr}\) defined by \(\text {Fr} ={u_i}/{\sqrt{g\, H_i}} \) is chosen equal to 2.5 corresponding to a supercritical regime.
For better comparability and to avoid instabilities in the p2 approximation, we limit the free surface elevation and velocity components using the same limiting factor \(\alpha _e\) (15) for the nonadaptive cases and plot limited and unlimited results for the adaptive ones. Fig. 5, shows our (topologically) blockstructured grid (Zint et al. 2019) with 3 584 elements along with the steadystate solution for different approximations. Whereas a piecewise constant DG approximation is very diffusive, the limited linear and quadratic solutions look much better. Thanks to the adaption scheme, the constantlinear and the constantquadratic solutions using indicator JRL do not suffer from over or undershoots while representing the jumps very accurately without introducing too much diffusion.
The robustness and accuracy of our indicator are illustrated in Fig. 6, which details the local approximation order and the used adaption case (cf. Fig. 1). As expected, the constant plateaus are approximated by order 0 while higher orders are only activated in the vicinity of the discontinuities. When comparing the JE and GRE indicators, the unlimited simulations produce large under and overshoots in jump regions whereas the limited JE and GRE indicators demonstrate acceptable performance, even though the results become somewhat diffusive. For JE, a threshold of 0.005 led to the best results. For GRE, the threshold for the free surface elevation of 0.02 and for the velocity of 0.05 appears to be optimal.
To quantify the performance of different adaptivity indicators, Fig. 7 displays the difference plots for the free surface elevation \(\xi \xi _{exact}\) using the exact solution (this problem can be solved analytically, see, for example, (Ippen 1951) projected on a high resolution mesh with approx. 230 000 elements as the reference. The constant solution is clearly diffusive, the limited linear and quadratic solutions look reasonable. The darker colors in the unlimited constantlinear solutions indicate over and undershoots which are absent in the fully limited adaptive solutions and in our adaption scheme with builtin liming. In Table 2, the \(L^1\)errors with respect to the exact solution are listed next to the fraction of elements with a given approximation order and the total number of degrees of freedom. It can be seen that between 64 % and 82 % of the elements use a constant approximation, and the padaptive solutions only need between 45 % and 58 % of the degrees of freedom of the uniformly linear approximation for p01 and approx. 63 % for p02.
4.3 Circular hydraulic jump
The last test example used to study our adaptivity indicator considers an instationary circular hydraulic jump based on the setup presented in Ketcheson and Quezada de Luna (2022). The domain geometry is a quarter annulus with \(r_0\in (0.1, 1)\) (cf. Fig. 8 (left)) and a constant bathymetry \(h_b=0.1\). The solution to this problem contains constant plateaus, smooth nonconstant regions, and discontinuities. There is a constant inflow at \(r_0 = 0.1\), that is, \(\hat{\xi }(r_0=0.1, t) = 0.2\), \(\hat{q}_{\varvec{n}}(r_0=0.1, t) = 0.75\) and \(\hat{q}_{\varvec{\tau }}(r_0=0.1, t) = 0\). Differing from the original setup, we prescribe a land boundary condition at \(r_0 = 1\) causing a reflection. The initial conditions are \(\xi (r_0, 0) = 0\) and \(\varvec{q}(r_0, 0) = \varvec{0}\). The gravity acceleration g is set to 1.
The employed blockstructured grid (Zint et al. 2019) consists of 48 000 triangles, and r in Fig. 8 (left) indicates the line along which the free surface elevation is plotted in Fig. 11. In the middle and right panels of Fig. 8, the p0 highresolution solution at \(t=0.5\,\mathrm {s}\) and \(t=1.3\,\mathrm {s}\) on a mesh with 768 000 elements is displayed, which serves as a reference in the following evaluation.
To avoid instabilities at the inflow, we limit the free surface elevation and velocity components with the same limiting factor \(\alpha _e\) (15) for all cases except for the JRL indicator. The JRL indicator automatically reduces the local approximation order on critical elements at the inflow boundary to zero making limiting unnecessary there. The JE and the GRE indicators fail to detect the need for the lowest approximation order on critical elements therefore only the limited solution is stable.
The padaptive solution with different indicators is shown for \(t=0.5\,\mathrm {s}\) (Fig. 9a) and \(t=1.3\,\mathrm {s}\) (Fig. 9b), respectively. For indicator JE, a threshold of 0.00001 led to the best results. For indicator GRE, the threshold for the free surface elevation of 0.6 and for the velocities of 1.0 resulted in the best simulation outcome.
The difference plots for \(\xi  \xi _{ref}\) in Fig. 10 confirm that our indicator is better at capturing jumps than the two other indicators as pointed out by lighter colors in the corresponding regions. Furthermore, a linear approximation for the dropoff after the inflow is correctly identified. The \(L^1\)errors with respect to the reference solution are shown in Table 3 along with the fraction of elements with a given approximation order. All adaptive cases approximately match the \(L^1\)errors of the uniformly linear solution for \(t=0.5\,\mathrm {s}\) while using fewer than 44 % of the degrees of freedom for p01 and approx. 50 % for p02. The \(L^1\)errors of the adaptive solutions (except for the JE indicator) are even lower for \(t=1.3\,\mathrm {s}\) when compared to the uniformly linear approximation and utilize up to approx. 60 % of degrees of freedom for the p01 approximation and approx. 78 % for the p02 approximation.
Figure 11 displays the free surface elevation along the line ’r’ highlighted in Fig. 8 (left). Noting that \(h_b\)=0.1, it shows a very good agreement with Fig. 7 from (Ketcheson and Quezada de Luna 2022). The zoomins also demonstrate a better accuracy of the approximations using the JRL indicator in the jump regions compared to those relying on the JE or GRE indicator with limiting.
5 Conclusions and outlook
We presented a parameterfree adaptivity indicator and validated its ability to identify resolved and underresolved areas of the computational domain while distinguishing between smooth and nonsmooth solution regions and adapting the local approximation order accordingly. On a range of numerical examples, our new indicator demonstrated comparable or better solution quality than that of a limited uniformly linear approximation. These results were achieved without any calibration parameters while using significantly fewer degrees of freedom. A comparison to two further indicators suggests that our new scheme achieves a good balance between solution quality and number of degrees of freedom used.
This work is an integral part of our ongoing effort to produce a padaptive DG solver for the SWE capable of efficient utilization of massively parallel and heterogeneous computing architectures (FaghihNaini et al. 2023). It bundles a number of other numerical and computational techniques such as a novel blockstructured grid generator for ocean domains (Zint et al. 2019, 2022; FaghihNaini et al. 2022) and the code generation framework (Lengauer et al. 2014; Schmitt et al. 2014a; Kuckuk and Köstler 2016). Our future research goals include adding the FPGA support—already available for the unstructuredmesh version of the model (Kenter et al. 2021; Faj et al. 2023)—and implementing semiimplicit time stepping schemes based on the hierarchical scale separation (HSS) approach (Aizinger et al. 2015; Schütz and Aizinger 2017) related to the pmultigrid method.
References
Aizinger, V.: A geometry independent slope limiter for the discontinuous Galerkin method. In: Krause, E., Shokin, Y., Resch, M., Kröner, D., Shokina, N. (eds.) Computational Science and High Performance Computing IV, Notes on Numerical Fluid Mechanics and Multidisciplinary Design, pp. 207–217. Springer, Berlin (2011)
Aizinger, V., Kosik, A., Kuzmin, D., Reuter, B.: Anisotropic slope limiting for discontinuous Galerkin methods. Int. J. Numer. Methods Fluids 84(9), 543–565 (2017). https://doi.org/10.1002/fld.4360
Aizinger, V., Kuzmin, D., Korous, L.: Scale separation in fast hierarchical solvers for discontinuous Galerkin methods. Appl. Math. Comput. 266, 838–849 (2015). https://doi.org/10.1016/j.amc.2015.05.047
Burbeau, A., Sagaut, P.: A dynamic padaptive discontinuous Galerkin method for viscous flow with shocks. Comput. Fluids 34, 401–417 (2005). https://doi.org/10.1016/j.compfluid.2003.04.002
Eskilsson, C.: An hpadaptive discontinuous Galerkin method for shallow water flows. Int. J. Numer. Methods Fluids 67, 1605–1623 (2011). https://doi.org/10.1002/fld.2434
FaghihNaini, S., Kuckuk, S., Aizinger, V., Zint, D., Grosso, R., Köstler, H.: Quadraturefree discontinuous Galerkin method with code generation features for shallow water equations on automatically generated blockstructured meshes. Adv. Water Resour. 138, 103552 (2020). https://doi.org/10.1016/j.advwatres.2020.103552
FaghihNaini, S., Kuckuk, S., Zint, D., Kemmler, S., Aizinger, V.: Discontinuous Galerkin method for the shallow water equations on complex domains using masked blockstructured grids (2022)
FaghihNaini, S., Aizinger, V., Kuckuk, S., Angersbach, R., Köstler, H.: padaptive discontinuous Galerkin method for the shallow water equations on heterogeneous computing architectures (2023)
Faj, J., Plessl, C., Kenter Tobias FaghihNaini, S., Aizinger, V.: Scalable MultiFPGA Design of a Discontinuous Galerkin ShallowWater Model on Unstructured Meshes. In: submitted to Proceedings of The 2023 ACM/SIGDA International Symposium on Field Programmable Gate Arrays (FPGA ’23). Association for Computing Machinery, New York, NY, USA (2023)
Frank, F., Reuter, B., Aizinger, V., Knabner, P.: FESTUNG: a MATLAB/GNU Octave toolbox for the discontinuous Galerkin method, Part I: diffusion operator. Comput. Math. Appl. 70(1), 11–46 (2015). https://doi.org/10.1016/j.camwa.2015.04.013
Gottlieb, S., Shu, C.W.: Total variation diminishing rungekutta schemes. Math. Comp. 67(221), 73–85 (1998). https://doi.org/10.1090/S0025571898009132
Hajduk, H.: Monolithic convex limiting in discontinuous Galerkin discretizations of hyperbolic conservation laws. Comput. Math. Appl. 87, 120–138 (2021). https://doi.org/10.1016/j.camwa.2021.02.012
Hajduk, H., Hodges, B.R., Aizinger, V., Reuter, B.: Locally Filtered Transport for computational efficiency in multicomponent advectionreaction models. Environ. Modell. Softw. 102, 185–198 (2018). https://doi.org/10.1016/j.envsoft.2018.01.003
Hajduk, H., Kuzmin, D., Aizinger, V.: New directional vector limiters for discontinuous Galerkin methods. J. Comput. Phys. 384, 308–325 (2019). https://doi.org/10.1016/j.jcp.2019.01.032
Ippen, A.: Highvelocity flow in open channels: a symposium: mechanics of supercritical flow. Trans. Am. Soc. Civ. Eng. 116(1), 268–295 (1951)
Kenter, T., Shambhu, A., FaghihNaini, S., Aizinger, V.: Algorithmhardware codesign of a discontinuous Galerkin shallowwater model for a dataflow architecture on FPGA. In: Proceedings of the Platform for Advanced Scientific Computing Conference, PASC ’21. Association for Computing Machinery, New York, NY, USA (2021). https://doi.org/10.1145/3468267.3470617
Ketcheson, D.I., Quezada de Luna, M.: Numerical simulation and entropy dissipative cure of the carbuncle instability for the shallow water circular hydraulic jump. Int. J. Numer. Methods Fluids (2022). https://doi.org/10.1002/fld.5070
Krivodonova, L., Xin, J., Remacle, J.F., Chevaugeon, N., Flaherty, J.: Shock detection and limiting with discontinuous Galerkin methods for hyperbolic conservation laws. Appl. Numer. Math. 48(3), 323–338 (2004). https://doi.org/10.1016/j.apnum.2003.11.002. Workshop on Innovative Time Integrators for PDEs
Kubatko, E.J., Bunya, S., Dawson, C., Westerink, J.J.: Dynamic padaptive RungeKutta discontinuous Galerkin methods for the shallow water equations. Comput. Methods Appl. Mech. Eng. 198(21), 1766–1774 (2009). Advances in SimulationBased Engineering Sciences—Honoring. J. Tinsley Oden. https://doi.org/10.1016/j.cma.2009.01.007
Kuckuk, S., Köstler, H.: Automatic generation of massively parallel codes from ExaSlang. Computation 4(3), 27:1–27:20 (2016). https://doi.org/10.3390/computation4030027. Special Issue on High Performance Computing (HPC) Software Design
Kuzmin, D.: A vertexbased hierarchical slope limiter for padaptive discontinuous Galerkin methods. J. Comput. Appl. Math. 233(12), 3077–3085 (2010). https://doi.org/10.1016/j.cam.2009.05.028. Finite Element Methods in Engineering and Science (FEMTEC 2009)
Kuzmin, D., Schieweck, F.: A parameterfree smoothness indicator for highresolution finite element schemes. Open Math. 11(8), 1478–1488 (2013). https://doi.org/10.2478/s1153301302544
Lengauer, C., Apel, S., Bolten, M., Chiba, S., Rüde, U., Teich, J., Größlinger, A., Hannig, F., Köstler, H., Claus, L., Grebhahn, A., Groth, S., Kronawitter, S., Kuckuk, S., Rittich, H., Schmitt, C., Schmitt, J.: Exastencils: advanced multigrid solver generation. In: Bungartz, H.J., Reiz, S., Uekermann, B., Neumann, P., Nagel, W.E. (eds.) Software for Exascale Computing—SPPEXA 2016–2019, pp. 405–452. Springer International Publishing, Cham (2020)
Lengauer, C., Apel, S., Bolten, M., Größlinger, A., Hannig, F., Köstler, H., Rüde, U., Teich, J., Grebhahn, A., Kronawitter, S., Kuckuk, S., Rittich, H., Schmitt, C.: ExaStencils: Advanced stencilcode engineering. In: EuroPar 2014: Parallel Processing Workshops, Lecture Notes in Computer Science, vol. 8806, pp. 553–564. Springer (2014). https://doi.org/10.1007/9783319143132_47
LeVeque, R.J.: Finite Volume Methods for Hyperbolic Problems. Cambridge Texts in Applied Mathematics. Cambridge University Press (2002). https://doi.org/10.1017/CBO9780511791253
Michoski, C., Mirabito, C., Dawson, C., Wirasaet, D., Kubatko, E., Westerink, J.: Adaptive hierarchic transformations for dynamically penriched slopelimiting over discontinuous Galerkin systems of generalized equations. J. Comput. Phys. 230(22), 8028–8056 (2011). https://doi.org/10.1016/j.jcp.2011.07.009
Naddei, F., de la Llave Plata, M., Couaillier, V., Coquel, F.: A comparison of refinement indicators for padaptive simulations of steady and unsteady flows using discontinuous Galerkin methods. J. Comput. Phys. 376, 508–533 (2019). https://doi.org/10.1016/j.jcp.2018.09.045
Remacle, J.F., Flaherty, J.E., Shephard, M.S.: An adaptive discontinuous Galerkin technique with an orthogonal basis applied to compressible flow problems. SIAM Rev. 45(1), 53–72 (2003). https://doi.org/10.1137/S00361445023830
Reuter, B., Aizinger, V., Wieland, M., Frank, F., Knabner, P.: FESTUNG: a MATLAB/GNU Octave toolbox for the discontinuous Galerkin method, Part II: advection operator and slope limiting. Comput. Math. Appl. 72(7), 1896–1925 (2016). https://doi.org/10.1016/j.camwa.2016.08.006
Schmitt, C., Kuckuk, S., Hannig, F., Köstler, H., Teich, J.: ExaSlang: A domainspecific language for highly scalable multigrid solvers. In: Proceedings of the Fourth International Workshop on DomainSpecific Languages and HighLevel Frameworks for High Performance Computing (WOLFHPC), pp. 42–51. IEEE Computer Society (2014)
Schmitt, C., Kuckuk, S., Hannig, F., Köstler, H., Teich, J.: Exaslang: A domainspecific language for highly scalable multigrid solvers. In: 2014 Fourth International Workshop on DomainSpecific Languages and HighLevel Frameworks for High Performance Computing, pp. 42–51 (2014). https://doi.org/10.1109/WOLFHPC.2014.11
Schütz, J., Aizinger, V.: A hierarchical scale separation approach for the hybridized discontinuous Galerkin method. J. Comput. Appl. Math. 317, 500–509 (2017). https://doi.org/10.1016/j.cam.2016.12.018
Toro, E.F., Hidalgo, A., Dumbser, M.: FORCE schemes on unstructured meshes i: conservative hyperbolic systems. J. Comput. Phys. 228(9), 3368–3389 (2009). https://doi.org/10.1016/j.jcp.2009.01.025
Tumolo, G., Bonaventura, L., Restelli, M.: A semiimplicit, semilagrangian, padaptive discontinuous Galerkin method for the shallow water equations. J. Comput. Phys. 232(1), 46–67 (2013). https://doi.org/10.1016/j.jcp.2012.06.006
Zienkiewicz, O.C., Ortiz, P.: A splitcharacteristic based finite element model for the shallow water equations. Int. J. Numer. Methods Fluids 20(8–9), 1061–1080 (1995). https://doi.org/10.1002/fld.1650200823
Zint, D., Grosso, R., Aizinger, V., FaghihNaini, S., Kuckuk, S., Köstler, H.: Automatic Generation of LoadBalancingAware BlockStructured Grids for Complex Ocean Domains. In: Robinson, T., Moxey, D., Tomov, V.Z. (eds.) Proceedings of the 2022 SIAM International Meshing Roundtable. Zenodo (2022). https://doi.org/10.5281/zenodo.6562440
Zint, D., Grosso, R., Aizinger, V., Köstler, H.: Generation of block structured grids on complex domains for high performance simulation. Comput. Math. Math. Phys. 59(12), 2108–2123 (2019). https://doi.org/10.1134/S0965542519120182
Acknowledgements
The authors gratefully acknowledge fruitful discussions with Dr. Sebastian Kuckuk and Dr. Hennes Hajduk and the support by NHR@FAU. This work was supported in part by the German Research Foundation (DFG) through grant AI 117/61 ‘Performance optimized software strategies for unstructuredmesh applications in ocean modeling’.
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
FaghihNaini, S., Aizinger, V. padaptive discontinuous Galerkin method for the shallow water equations with a parameterfree error indicator. Int J Geomath 13, 18 (2022). https://doi.org/10.1007/s13137022002083
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s13137022002083
Keywords
 padaptivity
 Error and smoothness indicator
 Discontinuous Galerkin method
 Quadraturefree
 Shallow water equations
 Ocean modeling