Abstract
We present the first implementation of the Active Flux method on adaptively refined Cartesian grids. The Active Flux method is a third order accurate finite volume method for hyperbolic conservation laws, which is based on the use of point values as well as cell average values of the conserved quantities. The resulting method has a compact stencil in space and time and good stability properties. The method is implemented as a new solver in ForestClaw, a software for parallel adaptive mesh refinement of patchbased solvers. On each Cartesian grid patch the single grid Active Flux method can be applied. The exchange of data between grid patches is organised via ghost cells. The local stencil in space and time and the availability of the point values that are used for the reconstruction, leads to an efficient implementation. The resulting method is third order accurate, conservative and allows the use of subcycling in time.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The Active Flux method is a finite volume method for hyperbolic conservation laws that was previously introduced by Eymann & Roe and Roe and coauthors [15,16,17, 23, 24, 26] . In its original form the method is third order accurate. This is achieved by using a continuous, piecewise quadratic reconstruction and a sufficiently accurate quadrature rule to compute numerical fluxes. The quadrature method, i.e. typically Simpson’s rule, requires point values of the conserved quantities at grid cell interfaces at the current time as well as at later time levels. These point values together with the cell average value are also used to compute the reconstruction. While classical finite volume methods only use cell average values of the conserved quantities as degrees of freedom, the Active Flux method involves both point values and cell average values degrees of freedom. This adds flexibility to the numerical method. For linear advection and the acoustic equations in one, two or three spatial dimensions, these point values can be updated using exact evolution formulas, making the method truly multidimensional.
Originally, Roe and Eymann [17] used unstructured triangular grids for their twodimensional Active Flux method. In [5] and [19], twodimensional Cartesian grid versions of the Active Flux method were introduced. The Cartesian grid method will also be used in this paper and briefly reviewed in the next section.
While the order of convergence of a numerical scheme is a property that can be shown in the limit when the mesh width and the time step goes to zero, for practical computations it is desirable to obtain accurate results on relatively coarse grids. Roe [24, 25] argues that the accurate approximation on coarse grids is strongly influenced by the computational stencil and that exact evolution operators perform well in this respect. Barsukow showed that the twodimensional Cartesian grid Active Flux method for the acoustic equations with an exact evolution operator as described in [2, 18] is stationary preserving. This means that the numerical scheme does not add dissipation to discrete representations of all stationary states of the acoustic equations. As a consequence such states can be computed with very high accuracy on coarse grids, while other methods would require a higher resolution.
In earlier related work, LukáčováMedvid’ová et al. [21, 22], used multidimensional evolution operators as building blocks of finite volume methods of various order. Those methods differ from the Active Flux method mainly in the choice of the degrees of freedom. There is also recent work in progress on applying the Active Flux method to nonlinear hyperbolic problems [3, 19] and to hyperbolic problems with source term [4].
Although the Active Flux method performs well on coarse grids, for practical applications it might still be desirable to vary the size of the grid cells adaptively in order to allow a higher resolution in parts of the computational domain as needed. A possible application that could benefit from local refinement is the propagation of a high frequency acoustic wave.
In this paper we show how the Active Flux method can be applied on adaptively refined Cartesian grids. The local stencil of the method allows an efficient transfer of data between the different grid patches. Our numerical results confirm third order accuracy of the resulting method.The method is implemented as a new solver in ForestClaw [9, 11, 12].
This paper is organised as follows. In Sect. 2 we briefly review the Active Flux method for twodimensional Cartesian grids. Section 3 describes the extension to adaptively refined grids. In Sect. 4 we introduce new Active Flux methods for advective transport and illustrate the performance of the adaptively refined Active Flux method for a variety of test problems.
2 The Cartesian Grid Active Flux Method
In this section we provide a brief review of the Active Flux method on a single twodimensional Cartesian grid. More details can be found in Barsukow et al. [5] and Helzel et al. [19].
We consider hyperbolic conservation laws in divergence form
where \(q:{\mathbb {R}}^2 \times {\mathbb {R}}^+ \rightarrow {\mathbb {R}}^s\) is a vector of conserved quantities and \(f, g : {\mathbb {R}}^s \rightarrow {\mathbb {R}}^s\) are vector valued flux functions. On a single patch we use a twodimensional Cartesian grid with equidistant mesh sizes \(\Delta x\) and \(\Delta y\). The grid cell (i, j) is described by \([ x_{i\frac{1}{2}},x_{i+\frac{1}{2}}] \times [ y_{j\frac{1}{2}}, y_{j+\frac{1}{2}}] \subset {\mathbb {R}}^2, \, i,j, \in {\mathbb {Z}}.\) As a finite volume method, the Active Flux method computes cell averaged values of the conserved quantities via an update of the form
where \(Q_{i,j}^n\) is an approximation of the cell average values of the conserved quantities in grid cell (i, j) at time \(t_n\) and \(F_{i\pm \frac{1}{2},j}\), \(G_{i,j\pm \frac{1}{2}}\) are numerical fluxes at the grid cell interfaces given by
As suggested by Eymann and Roe, we use Simpson’s rule to compute the numerical fluxes. For fluxes \(F_{i + \frac{1}{2},j}\), this leads to the formula
We use an analogous formula for the flux \(G_{i,j+\frac{1}{2}}\). The Q values in the right hand side of (2) are approximations to point values of the conserved quantities at the grid cell interface at times \(t_n\), \(t_{n+\frac{1}{2}}\) and \(t_{n+1}\). To compute these point values, we assume that at time \(t_n\) the average values \(Q_{i,j}^n\) and point values at cell corners \(Q_{i\pm \frac{1}{2}, j \pm \frac{1}{2}}^n\) and edge midpoints \(Q_{i\pm \frac{1}{2},j}^n\) and \(Q_{i,j\pm \frac{1}{2}}^n\) are known. The locations of these point values are shown in Fig. 1.
Based on these known values, a twodimensional quadratic polynomial can be reconstructed in each grid cell. For simplicity, all Cartesian grid cells are mapped to a reference cell \([1,1] \times [1,1]\). In each cell, the reconstruction has the form
with \(c_{ij} \in {\mathbb {R}}\), \(i,j = 0, 1, 2\) and \((\xi ,\eta ) \in [1,1] \times [1,1]\). The precise form of the reconstructed function is obtained by interpolating the eight known point values along the grid cell boundary and by requiring that the average of the reconstructed function agrees in each grid cell with the known cell average. This can conveniently be obtained by using appropriate basis functions as introduced in [19].
We denote the reconstructed, continuous, piecewise polynomial function at time \(t_n\) by \(q^n(x,y)\). A reconstructed polynomial in grid cell (i, j) is denoted \(q_{ij}(x,y)\).
For special linear partial differential equations, the required point values of the conserved quantities can be calculated using an exact evolution formula applied to the piecewise quadratic data. This is in particular the case for linear advection and acoustics. The use of the exact evolution formula leads to a truly multidimensional numerical method. While the point values at time \(t_{n+\frac{1}{2}}\) are only used in order to compute the numerical fluxes, the point values at time \(t_{n+1}\) are also used to compute the continuous, piecewise quadratic reconstruction \(q^{n+1}(x,y)\), which provides the initial data for the next time step.
Since the point values are located along the grid cell boundaries, they are used for the reconstruction in two or four grid cells. Thus, the Active Flux method for twodimensional Cartesian grids has four degrees of freedom per grid cell: the cell average plus three point values along the grid cell boundary. In our implementation, we associate point values \(Q_{i\frac{1}{2},j}\), \(Q_{i\frac{1}{2},j\frac{1}{2}}\), \(Q_{i,j\frac{1}{2}}\) and the average value \(Q_{i,j}\) with grid cell (i, j).
2.1 Advection Equation
For the advection equation
with \(q:{\mathbb {R}}^2 \times {\mathbb {R}}^+ \rightarrow {\mathbb {R}}\), \(a, b \in {\mathbb {R}}\), the exact evolution formula has the form
Thus, the required point values at time \(t_{n+\frac{1}{2}}\) and \(t_{n+1}\) can easily be computed by evaluating the continuous, piecewise quadratic function \(q^n\) at the appropriate upwind points, for example
In the numerical method, we want to restrict the time steps, so that waves propagate at most one grid cell per time step. This can be expressed in the form
We have shown in [13] that linear stability requires a more severe time step restriction. In practical computations we therefore use time steps which satisfy \(\text{ CFL } \le 0.75\).
In Sect. 4 the approach is extended to advective transport in a spatially and temporally varying velocity field.
2.2 Burgers’ Equation
For the twodimensional Burgers’ equation
with \(q : {\mathbb {R}}^2 \times {\mathbb {R}}^+ \rightarrow {\mathbb {R}}\), we do not have an exact evolution formula. Instead we approximate the point values using an approximative approach described in [13]. See also [3], where a similar approach was proposed for general scalar nonlinear hyperbolic problems.
For smooth solutions, equation (7) can equivalently be written in the advective form
which suggests the implicitly defined evolution formula
Starting with an initial guess
we iteratively compute
Wave speeds at other positions are computed analogously. Each iteration improves the accuracy by one order. This was shown in [13] using Taylor series expansion. We start the iteration with a first order accurate approximation. The piecewise quadratic reconstruction limits the achievable accuracy to third order. Thus, a third order accurate approximation can be achieved after two iterations.
An obvious initial guess would be to use the point values at the respective location, i.e.
and analogously for all other point values along the grid cell boundaries. These wave speeds are third order accurate in space and first order accurate in time. However, this choice suffers from an instability, if the characteristic speed changes sign as explained in detail in [19]. The instability can be mitigated if data from all adjacent grid cells are used to compute the initial guess. This leads to a stronger coupling of wave speeds and cell average values. Here, we compute the initial guess of the wave speed based on the neighbouring cell average values, i.e. we use
The slight increase of the stencil, as introduced by this initial guess of the wave speeds, leads to a stable approximation.
2.3 Acoustics
The acoustic equations are given by
where \({{\varvec{u}}}:{\mathbb {R}}^2 \times {\mathbb {R}}^+ \rightarrow {\mathbb {R}}^2\) is the velocity vector, \(p:{\mathbb {R}}^2 \times {\mathbb {R}}^+ \rightarrow {\mathbb {R}}\) is the pressure and \(c \in {\mathbb {R}}^+\) is the speed of sound.
The evolution formula for the twodimensional acoustic equations, used for most problems in this paper, can be found in [17]. It is based on the observation that (11) can be rewritten as
where \({{\varvec{w}}} = \nabla \times {{\varvec{u}}}\) is the vorticity and \(\triangle \) is the Laplacian operator. For the twodimensional cases considered in this paper, vorticity will have the form \((0,0,v_xu_y)^T\). Thus, in a flow with constant vorticity (i.e. irrotational flow) both pressure and velocity satisfy a wave equation. Furthermore, it is easy to verify that the vorticity is stationary, i.e. in the twodimensional case the relation \(\partial _t (v_x  u_y) = 0\) holds.
Using an exact representation of the solution of the wave equation \(\partial _{tt} \phi = c^2 \Delta \phi \) in the form
that can be found for example in Courant and Hilbert [14], Eymann and Roe [17] proposed the evolution formulas
where \(R = c \cdot t\) and \(M_R\{ f\}\) is the spherical mean. The values of pressure and velocity at the right hand side of the evolution equation (14) are given initial values at time \(t=0\). For a scalar function \(f:{\mathbb {R}}^2 \rightarrow {\mathbb {R}}\), the spherical mean over a disc with radius R, centred at (x, y) is defined by
In the vector valued case, the formula is applied component wise. The solution formula can be evaluated exactly, if during each time step the previous values of pressure and velocity are replaced by the corresponding components of the reconstructed continuous, piecewise quadratic function \(q^n\). In [17], this is explained in detail for triangular grids. In the above equations, we have replaced the time derivatives in (13) by derivatives with respect to R to obtain (14). For the Active Flux reconstruction on Cartesian grids those derivatives can be computed in the classical sense. Figure 2 illustrates the circular areas that contribute to the update of the point values at a corner of a grid cell as well as at an edge. By derivation, (14) is exact for initial values with constant vorticity.
Fan and Roe [18] derived an exact evolution formula for general initial values based on the observation that (13) can be rewritten as
Applying (16) to the acoustic equations (11) leads to
Using Helmholtz decomposition, Fan and Roe argued that this is indeed an exact evolution formula for the acoustic equations. The pressure and the curl free component of the velocity satisfy a wave equation and thus (17). The divergence free component is constant in time and therefore correctly contained in the term \(\textbf{u}(\textbf{x},0)\).
While the derivation of Fan and Roe assumed sufficiently smooth data such that all derivatives can be computed in the classical sense, Barsukow [1] showed that the evolution formula is also valid more generally if interpreted in the distributional sense. If the solution operator is applied to the continuous, piecewise quadratic Active Flux reconstruction, the evaluation of the Laplacian introduces Dirac delta functions along grid cell interfaces. Barsukow proposes integration in the radial direction, thus avoiding these delta function singularities at grid cell interfaces. The resulting formulas are given in equations (2.16) and (2.17) of [5]. If applied to the Active Flux reconstruction, differentiation across grid cell interfaces is avoided and all terms can be evaluated in the classical sense.
Each time step of the explicit Active Flux method is restricted so that the circle around the edge midpoint over which the integration takes place remains inside the two adjacent grid cells, as shown in Fig. 2. We want to restrict the time step so that waves propagate at most half a grid cell per time step. This condition will be met if
Larger time steps would make the implementation of the update of the point value indicated in the right of Fig. 2 more complicated and have therefore not been considered. In [13] we showed that this necessary condition is sufficient for linear stability of the Cartesian grid Active Flux method with exact evolution.
3 Adaptive Mesh Refinement for the Active Flux Method
We now describe the implementation of the adaptive Active Flux method as a new solver in ForestClaw [9], a software for parallel adaptive mesh refinement based on a quadtree approach. In ForestClaw, Cartesian grid patches occupy quadrants in a quadtree, or multiblock forest of quadtrees. ForestClaw was developed by Calhoun and Burstedde based on the p4est software [10].
Mesh refinement is realised by a bisection of grid patches so that a quadrant of resolution level \(\ell \) is replaced by four quadrants of resolution level \(\ell +1\). A patch of level zero would correspond to a single Cartesian grid discretizing a single, square domain. The number of grid cells on a single quadrant is constant for all levels, resulting in a 2:1 refinement ratio between resolution levels. Typically \(8 \times 8\), \(16 \times 16\) or \(32 \times 32\) grid cells are used on a single patch, which allows a flexible change of the resolution. Furthermore, single grid patches can efficiently be handled by separate processors in a parallel computation. Figure 3 shows a typical situation.
A ForestClaw mesh inherits many properties from the underlying p4est mesh [10]. In particular, a ForestClaw mesh is wellbalanced so that adjacent quadrants never differ by more than one level. This is a necessary condition for the definition of data transfer between different patches, which is organized using ghost cells and described in more detail below. Another key feature of the ForestClaw mesh is that it is dynamically adapted to follow solution features of interest. At each time step, we apply coarsening and refinement criteria to the solution on each quadrant. If the coarsening criteria is satisfied by the solution in each quadrant in a family of four quadrants, the four quadrants will be replaced by a single quadrant, and the solution will be averaged from the finer grids to the new coarser solution. Otherwise, if the solution on a quadrant satisfies the refinement criteria, the quadrant will be subdivided into four quadrants, and the solution will be interpolated from the coarse parent to the new finer solution on each of the child quadrants. The details of the interpolation and averaging are provided next.
3.1 Spatial Transfer of Grid Cell Information
Solution data in a composite ForestClaw mesh needs to be communicated between adjacent grids sharing quadrant boundaries, and when dynamically coarsening and refining the mesh. The Active Flux method allows a very efficient transfer of both pointwise and cellaverage information. In the following, a "grid patch" is both the p4est quadrant and the solution data in the quadrant. The following three situations need to be considered:

1.
A transfer from a fine grid to a coarse grid is needed if four grid patches at level \(\ell +1\) are coarsened to a single patch at level \(\ell \). The same approach is used for the computation of ghost cell values on a patch of level \(\ell \) from a neighbouring patch of level \(\ell +1\).

2.
A transfer from a coarse grid to a fine grid is needed if a patch of level \(\ell \) is marked for refinement and four patches at level \(\ell +1\) need to be reconstructed. The same approach is used for the computation of ghost cell values for a patch at level \(\ell +1\) from a neighbouring patch of level \(\ell \).

3.
For neighbouring grid patches of the same level the ghost cell information is simply copied from the neighbouring grid patches.
We will now discuss the first two approaches in more detail.
3.1.1 Transfer from Fine to Coarse Grids
The degrees of freedom of a coarse grid cell are computed from the degrees of freedom of four grid cells on the finer level as illustrated in Fig. 4. The cell average of the coarse cell is the average of the four cell average values on the fine grid. The point values are copied from the point values at the vertices of the fine grid cells.
3.1.2 Transfer from Coarse to Fine Grids
We use the degrees of freedom of the coarse grid cell to reconstruct a quadratic polynomial as described in Sect. 2. This polynomial can be evaluated at all the required point values along the edges of the fine grid cells. The cell average values of the four fine grid cells are computed using Simpson’s rule. This requires the additional computation of four point values on the coarse grid cell at the positions of the centers of the fine grid cells. An illustration is shown in Fig. 5. Since Simpson’s rule is exact for our reconstructed function the sum of the cell average values on the four fine grid cells agrees with the cell average on the coarse grid cell exactly. This is a necessary property in order to maintain conservation.
3.2 Subcycling for a Local Refinement in Space and Time
In explicit finite volume methods for hyperbolic conservation laws, the time step is necessarily restricted by a CFL condition, which requires the numerical domain of dependence to contain the true domain of dependence of the partial differential equations [20].
The Active Flux method has a very compact stencil as explained in Sect. 2. Thus, for stability it is necessary to restrict the time step in such a way that information travels at most through one grid cell. Our results from [13] show that the time step should be restricted by \(\text{ CFL } \le 0.75\) for twodimensional advection problems and by \(\text{ CFL } \le 0.5\) for the twodimensional acoustic equations.
On an adaptively refined mesh, the smallest grid cells would typically dictate the time step restriction for the whole domain. To increase the efficiency of the computation, local time stepping (or "subcycling") can be used. In a subcycled computation, several time steps on more refined patches are taken for one time step on the coarsest grid. Subcycling was included in the original AMR algorithm by Berger and Oliger [8] and Berger and Colella [6] and is a standard feature of many AMR codes, including AMRClaw [7], AMReX [27] and many others. The local stencil of the Active Flux method allows for efficient implementation of subcycling, which will now be described in more detail.
3.2.1 Subcycling
In order to use subcycling, we reconstruct the solution in two layers of ghost cells surrounding each patch.
We illustrate the idea for the onedimensional case but an extension to the twodimensional situation is straightforward. Assume a situation with three different grid patches as illustrated in Fig. 6. The coarsest grid, denoted as grid 1, has refinement level \(\ell \). The grid cells on this part of the domain have length \(\Delta x_\ell \). Our grid 2 has refinement level \(\ell +1\) and the grid cell length satisfies \(\Delta x_{\ell +1} = \Delta x_\ell / 2\). On the finest mesh, i.e. grid 3, we have \(\Delta x_{\ell +2} = \Delta x_{\ell +1} / 2\). For efficiency, we will use a time step \(\Delta t_\ell \) on grid 1, two time steps \(\Delta t_{\ell +1} = \Delta t_{\ell }/2\) on grid 2 and four time steps \(\Delta t_{\ell +2} = \Delta t_{\ell +1}/2 = \Delta t_{\ell }/4\) on grid 3.
In the ForestClaw implementation, we start the time stepping on the finest level grids. Referring to grids 1,2 and 3 described above, the algorithm proceeds as follows for this threelevel mesh configuration.

1.
Advance the solution one step on grid 3 using time step \(\Delta t_{\ell +2}\).

2.
Recursively advance the solution one step on grid 2 (using time step \(\Delta t_{\ell +1}\)) and on grid 1 (using time step \(\Delta t_{\ell }\)).

3.
Advance the solution a second step on grid 3.

4.
Grids 2 and 3 are now time synchronized and ghost cell data is exchanged between these levels.

5.
Advance the solution a third step on grid 3.

6.
Recursively update the solution a second step on level 2.

7.
Advance the solution a fourth step on grid 3.
In each grid advance, the first layer of ghost cells is updated along with all interior cells. These ghost cell values are needed to update interior cells at the fine grid intermediate time level with no corresponding coarse grid time level. To simplify the subcycling algorithm, we update this first layer of ghost cells at both fine grid time steps, even though the ghost cell values from the second update are never used and will be replaced by data averaged or interpolated from the neighboring finer or coarser grids when coarse and fine grids are time synchronized. For those grids at the physical boundary, physical boundary conditions are used at all time levels. The time step on each grid uses a stable time step appropriate for that grid. These steps are illustrated in Fig. 7.
The key difference between the subcycling approach described above and the subcycling described in the original second order finite volume schemes described by Berger, Oliger and Colella is that in the Active Flux method, ghost cells at the intermediate time level are not filled using time interpolation from neighboring coarser grid cells. Instead we obtain all the required data directly from previously updated degrees of freedom of the Active Flux method.
3.2.2 Global Conservation Property
To ensure the global conservation property of the method, the fluxes at grid cell interfaces need to be defined in a unique way. At regular grid cell interfaces the Active Flux method automatically satisfies this conservation property. At interfaces of patches with different refinement level, conservation needs to be enforced by some kind of “conservative fix”. We use the classical approach described by Berger and Colella [6], and update both the coarse and the fine grid cells using the fluxes that have been computed for the more resolved grid.
3.2.3 Exactness for Advective Transport
Remark 3.1
If the Cartesian grid Active Flux method with adaptive mesh refinement is used to solve the twodimensional advection equation (4) with polynomial initial values of the form \(q_0 \in {\mathbb {P}}_p\), \(p\in {\mathbb {N}}\), then the numerical solution agrees with the exact solution for \(p \le 2\).
Proof
As a consequence of the interpolation at the point value degrees of freedom, the continuous, piecewise quadratic reconstruction of the Active Flux method agrees with the initial values. The coarsening and the refinement steps, described in Sect. 3.1, are exact for all polynomials of degree two or less. Thus, the update of the point values using the exact evolution formula described in Sect. 2.1 is exact. The numerical fluxes agree with the exact fluxes because Simpson’s rule is even exact for all polynomial of degree three. This leads to an exact computation of the new cell average values. \(\square \)
3.3 Efficiency
In ForestClaw, the overhead costs associated with patch communication (ghost cell exchanges as well as parallel communication) and dynamic regridding is typically less than 10%, even for problems with inexpensive solvers (e.g. second order scalar advection update). Overhead costs are dominated by ghost cells exchanges and communication, which will increase slightly in the Active flux method, since point values, in addition to cell averages must be communicated. However, the arithmetic intensity of the scheme also increases, and so we expect that AMR overhead with the Active Flux method will still be only a small fraction of the total costs of the simulation. Detailed performance characteristics will be investigated in future work.
4 Numerical Results
In this section we show numerical results for advection, advective transport with spatially and temporally varying velocity field, Burgers’ equation and acoustics. We introduce new Active Flux methods for advective transport problems and discuss the preservation of constant states.
For all computations we use subcycling and the conservative fix described above unless otherwise noted. Each grid patch uses \(16 \times 16\) Cartesian grid cells plus ghost cells. Our results confirm third order accuracy of the Active Flux method on adaptively refined grids.
4.1 Convergence Study for Advection
We consider the advection equation (4) on the domain \([0,1]\times [0,1]\) with initial condition
where \(r(x,y):=\sqrt{(xx_0)^2+(yy_0)^2}\) and \(H(r):=(\tanh (r/0.02) + 1)/2\) with \(r_0=0.15\) and \(x_0=y_0=0.5\). We use the advection speeds \(a=1\) and \(b=0.5\) and time steps which satisfy \(\text{ CFL }=0.6\).
Two different adaptively refined grids are considered. In the first case refinement is allowed only along the diagonal of the domain as shown in Fig. 8 (left plot). In the second case a patch is refined, if \(q_{max}q_{min}>0.001\). In this case the refined grid will follow the solution structure as shown in Fig. 8 (right plot). By comparing the numerical solution with the exact solution we can measure the error and compute the experimental order of convergence (EOC). The results are shown in Table 1 for refinement along the diagonal and for dynamic refinement which follows the solution structure.
For the academic test case with refinement along the diagonal, we see that the changes in the grid structure did not introduce any gridinduced artefacts. The accuracy observed on the adaptively refined grid is comparable with the accuracy on a regular Cartesian grid on the coarser level.
If the adaptive mesh follows the solution structure, then the accuracy obtained on the adaptively refined grid compares well with the accuracy obtained on a regular Cartesian grid that uses the highest level of refinement in the full domain. These results are shown in Table 1. The accuracy obtained on the adaptive mesh with levels \(35\) or \(36\) compares well with the accuracy obtained on the grids that are refined uniformly to levels 5 or 6.
4.2 SolidBody Rotation
Next we consider the linear advection equation with variable coefficients
on \([1,1] \times [1,1]\). We define the advection field for solid body rotation using the streamfunction \(\Psi (x,y)=\frac{\pi }{2}(x^2+y^2)\) and obtain
The velocity field is divergence free, thus Eq. (20) is equivalent to
Furthermore, the solution at time \(t=2n\), \(n \in {\mathbb {N}}\) agrees with the initial values since the flow has simply made n complete rotations. The characteristics satisfy the ordinary differential equation
with initial values \(x(0) = x_0\), \(y(0) = y_0\). We are interested in \((x(\tau ),y(\tau ))\) with \(\tau = \Delta t/2, \Delta t\). Those values can be computed using the analytical solution
This allows us to evaluate the conserved quantities at all required nodes of Simpson’s quadrature formula by tracing back the characteristics. For the flux \(F_{i+\frac{1}{2},j}\), we use Eq. (2) with, for example,
and
and analogously for all the other nodes.
We compare numerical solutions of (22) with initial condition (19) using refinement levels 36 and 37 after a half rotation with the exact solution and compute the error as well as the EOC. Results are shown in Table 2.
Again, the accuracy of the computations on the adaptively refined grids compares well with the accuracy obtained on the equidistant grids with highest resolution. Figure 9 shows the numerical solution with refinement level 36 after a half and a full rotation.
Remark 4.1
The Active Flux method for solid body rotation described in Sect. 4.2 preserves constant states on regular Cartesian grids.
Proof
We consider constant data at time \(t_n\), i.e. \(q(x,y,t_n) = C \in {\mathbb {R}}\). Then all the point values at time \(t_n\), \(t_{n+\frac{1}{2}}\) and \(t_{n+1}\) are equal to C and the numerical fluxes have the form
Thus, the fluxes in the xdirection only depend on y and the fluxes in the ydirection only depend on x. Consequently, all the flux differences cancel and the cell average values remain constant. \(\square \)
4.3 Advective Transport in a Spatially and Temporally Varying Divergence Free Velocity Field Defined by a Stream Function
Now we consider advective transport in a velocity field that depends on space and time, i.e. we study an equation of the form
The divergence free velocity field is again defined via a stream function which may now also vary in time. We use either the exact derivatives
or centered finite difference formulas
The point values of the conserved quantity q are computed at the intermediate and final time by tracing the characteristics back in time using the classical fourth order accurate RungeKutta method. The numerical fluxes are computed using Simpson’s rule, i.e., to compute \(F_{i+\frac{1}{2},j}\) we use (2) with for example \(f(Q_{i+\frac{1}{2},j}^{n+\frac{1}{2}}) = a(x_{i+\frac{1}{2}},y_j,t_{n+\frac{1}{2}}) Q_{i+\frac{1}{2},j}^{n+\frac{1}{2}}\), where \(Q_{i+\frac{1}{2},j}^{n+\frac{1}{2}}\) is the point value of the conserved quantity, computed using characteristics and evaluating the reconstructed function at the tracing point, and \(a(x_{i+\frac{1}{2}},y_j,t_{n+\frac{1}{2}})\) is obtained by evaluating either (28) or (29).
4.3.1 The Swirl Flow Problem
For the swirl flow problem we consider the stream function
To perform numerical convergence studies, we consider smooth initial values of the form
on the domain \([0,1]\times [0,1]\) with periodic boundary conditions. The solution at time \(t=n\), \(n=1,2,\ldots \) agrees with the initial data. In our computations, the velocity field was computed using either (28) or (29). For both cases we perform numerical convergence studies on uniform Cartesian grids as well as on adaptively refined grids with subcycling. Numerical results are shown in Fig. 10 and the results of a convergence study with and without subcycling are shown in Table 3. The results again confirm third order convergence. The use of subcycling did not significantly influence the accuracy nor does the use of the finite difference formula. Both approaches provide third order accurate approximations and comparable values of the error.
4.3.2 Exact Preservation of Constant States
In Remark 3.1 we have seen that for advection in a constant velocity field, constant, linear and quadratic functions are approximated exactly with the Active Flux method. This is no longer the case if we consider advective transport in a more general velocity field. We will now introduce a numerical flux which does preserve constant states. This new flux computation for \(F_{i+\frac{1}{2},j}\) uses the approximation
and analogously for the flux \(G_{i,j+\frac{1}{2}}\). Using again Simpson’s rule we obtain
and
In Appendix A we show that the use of the numerical fluxes (32), (33) leads to a second order accurate approximation of smooth solutions on Cartesian grids, if the divergence free velocity field is defined via a stream function and approximated using finite differences. A method which exactly preserves constant states might be of interest for the advective transport of piecewise constant data. In this case we can not expect high order accuracy even with a third order accurate method, since the data is not sufficiently smooth.
Theorem 4.2
The Active Flux method with fluxes of the form (32), (33) and a, b as defined in (29), provides a method for (27) that preserves constant states on the uniform Cartesian mesh.
Proof
We consider constant data at time \(t_n\), i.e. \(q(x,y,t_n)=C \in {\mathbb {R}}\). Then all the point values at time \(t_{n}\), \(t_{n+\frac{1}{2}}\) and \(t_{n+1}\), which are obtained by tracing back the characteristics, are also equal to C. The finite volume update now reduces to
For the terms at time level \(t_n\) we obtain
In the same way the terms at time \(t_{n+\frac{1}{2}}\) and \(t_{n+1}\) cancel and we obtain \(Q_{i,j}^{n+1} = Q_{i,j}^n = C\) for all i, j. \(\square \)
Now we consider Cartesian grids with adaptive mesh refinement. Without loss of generality we restrict considerations to the situation shown in Fig. 11. We again consider constant data at time \(t_n\), i.e. \(q(x,y,t_n) = C\). By Theorem 4.2, then, constant states are preserved for both fine grid cell and coarse grid cell updates. For the coarse cell update, the left flux \(F_{i\frac{1}{2},j}\) is the sum of two fluxes used to update the two small cells, i.e.
This is the same flux that is used on the uniform Cartesian grid. By Theorem 4.2, then, constant states are preserved for both fine grid cell and coarse grid cell updates. We summarize our result.
Corollary 4.3
The Active Flux method described above preserves constant states on Cartesian grids with adaptive mesh refinement when used with global time stepping (e.g. no subcycling).
With subcycling, the sum of the fluxes from the fine grid cells and that is used to update the coarse grid cell would contain components at the intermediate time that are in general not balanced by the remaining coarse grid fluxes.
To measure the error in the approximation of constant states by using subcycling, we compute the solution at time \(t=1\) using the velocity field of the swirl flow problem but with constant initial values that are equal to one in the whole domain. Refinement with levels \(34\) is used along the diagonal as shown in Fig. 8 (left). With subcycling we observe an error of size \(10^{13}\). Without subcycling the error is about \(10^{16}\), i.e. agrees with the expected roundoff error. If we instead use the third order accurate Active Flux method, which does not preserve constant states exactly, then the error observed for this test case is of the order \(10^{11}\) if the velocity field is defined via (28) and \(10^{6}\) if the velocity field is defined via (29). This is independent of the use of subcycling.
Now we consider the swirl problem with piecewise constant initial values of the form
on the domain \([0,1]\times [0,1]\) with periodic boundaries on top and bottom and with zeroorder extrapolation on the left and right boundary using refinement level 36. The reconstruction was limited using the bound preserving limiter described in [13]. Results are shown in Fig. 12. Subcycling was used although this slightly perturbs the exact preservation of constant states.
4.4 Burgers’ Equation
It is straightforward to apply the adaptive Active Flux method to scalar nonlinear hyperbolic problems. We consider the Burgers’ equation (7) on the domain \([0,1] \times [0,1]\) with initial values
To check the accuracy we compute numerical solutions at time \(t=0.05\). At this time, no shocks have formed, and the solution structure is still smooth. The time steps satisfy \(\text{ CFL } \le 0.5\). Furthermore, we use subcycling and the conservative fix. To test the accuracy of the adaptive method we enforce refinement along the diagonal from the upper left patch to the lower right patch. This test (not shown here) confirms third order accuracy.
At later times shocks arise and we used the bound preserving limiter introduced in [13]. Note that the characteristic speed changes sign which has been observed to lead to some numerical difficulties as explained in [13, 19]. By updating the point values using the approach from Sect. 2.2 we can avoid those problems.
Our unlimited method shows some unphysical oscillations along shock curves as can be seen by zooming into the second and third plots in Fig. 13 (top). The use of the bound preserving limiter avoids these inaccuracies. In this simulation grids on levels \(35\) are used.
As a refinement criterion we search for steep gradients and refine a patch if
for any i, j. We also use the refinement criteria to determine whether we need to apply limiting.
4.5 Acoustics
4.5.1 Convergence Study for Acoustics
In order to investigate the order of convergence of the adaptive Active Flux method for acoustics, we consider a test problem from Lukácǒvá et al. [21], for which the exact solution is explicitly known. In this test problem the acoustic equations (11) with initial values of the form
are considered on the domain \([1,1] \times [1,1]\). The speed of sound is set to \(c=1\) and periodic boundary conditions are imposed. The exact solution has the form
We compute numerical solutions at time \(t=1\) using time steps which allow us to maintain a CFL condition of 0.4. For the update of the point values we use the method from [17], which was briefly reviewed in Sect. 2.3. For this problem, adaptive mesh refinement does not offer any obvious benefit. Nevertheless, we can use this problem to test the accuracy of the adaptive method by constructing a static mesh using refinement criteria that is independent of the solution. We refine patches along the diagonal of the domain, and compare grids with refinement levels 23 and 34 with results obtained on uniform grids at levels 2 and 3. The results of our convergence study for pressure and velocity are shown in Table 4.
The accuracy obtained on the adaptively refined mesh is comparable to the accuracy obtained on a mesh refined uniformly to the coarser level. This test shows that the accuracy is maintained at the interface even as the solutions moves between coarser and finer levels.
4.5.2 High Frequency Acoustics
We consider a test problem where adaptive mesh refinement offers obvious benefit. We consider the acoustic equations (11) with initial condition
on the domain \([1.5,1.5]\times [1.5,1.5]\). The method from [17] was again used to update the point values. Initially a circular shaped acoustic wave with high frequency pressure oscillations is given. This leads to acoustic waves moving outwards and inwards. The inward moving acoustic wave gets reflected in the center of the domain (around the time shown in the third plot) and afterwards propagates outwards. Adaptive mesh refinement is used to resolve these high frequency waves. Figure 15 shows solutions at times \(t=0,0.3,0.6,0.9\) with refinement level \(36\). A patch is refined if \(p_{max}p_{min} \ge 0.001\). Figure 16 shows scatter plots of the solution at two different times. There are no visible spurious grid effects apart from some smearing of the solution structure caused by the boundary of the computational domain. For this simulation periodic boundary conditions were used.
4.6 Approximation of Steady States
Finally, we consider the approximation of a stationary vortex as described by Barsukow et al. [2, 5]. The initial values have the form
with \(r = \sqrt{x^2 + y^2}\), \({{\varvec{n}}} = (\sin \phi , \cos \phi )^T\), \(\phi \in [0, 2\pi )\) and \({{\varvec{u}}} = (u,v)^T\). In order to test how well the method preserves the steady state, the numerical solution is computed at time \(t=100\). These initial values do not have constant vorticity and thus the evolution formula of [17] (compare with Sect. 2.3) is not exact.
In [2, 5], Barsukow et al. showed that the Cartesian grid Active Flux method, with the evolution operator presented in [5], is stationary preserving. Numerical results shown in Fig. 17 confirm these findings. Here the solution structure at time \(t=100\) was computed on level 2 grids, each patch using \(16 \times 16\) cells plus ghost cells. This results in a \(64 \times 64\) grid for the whole domain. For this particular solution the numerical method does not introduce any numerical viscosity.
In order to test accuracy and stability with adaptive mesh refinement, we also performed computations using refinement along the diagonal of the computational domain as shown in Fig. 14 (left). For the AMR computation with exact evolution on each Cartesian grid patch we observe an instability while the method from [17], which is not exact for this flow and instead introduces some numerical viscosity, remains stable. Figure 18 shows scatter plots for both methods at different times. One possible approach to overcome this instability might consist of an exact approximation of point values at grid cell boundaries with different resolution on both sides of the interface. This has not been considered as it would make the AMR approach more complicated.
Finally, in Fig. 19, we approximate the vortex problem with refinement around the vortex structure using the method from [17] for the update of the point values. Grids at level 3–5 are used, which leads to an accurate approximation of the solution structure.
5 Conclusions
We showed that the Active Flux method can be used on Cartesian grids with adaptive mesh refinement and subcycling. The transfer of grid information between different Cartesian grid patches can be implemented without loss of third order accuracy by making use of the degrees of freedom of the Active Flux method. Our approach benefits from the local stencil of the Active Flux method.
For advective transport in a spatially and temporally varying velocity field, new Active Flux methods have been presented. We also discussed an Active Flux method which preserve constant states on regular Cartesian grids and grids with adaptive mesh refinement without subcycling. In practical computations with subcycling we also observed good accuracy although constant states are not exactly preserved.
The AMR concept of the Active Flux method can also be used for twodimensional linear hyperbolic systems as illustrated by the acoustic equations. However, the preservation of steady states, a property that was recently shown for the Active Flux method on regular Cartesian grids [2], does not carry over to adaptively refined meshes with the approaches presented in this paper.
Our AMR version of the Active Flux method makes use of the compact stencil and the fact that the reconstruction can be evaluated whenever needed. The update of the point values could be replaced by alternative third order accurate evolution formulas as long as they use the same compact stencil. Therefore, our AMR approach should be useful also for other Active Flux methods that might be developed in the future. Active Flux methods with larger stencils would lead to a less efficient communication between grid patches in particular if subcycling is used but the general idea would still extend to these stencils.
Data Availability
No experimental data was produced and used in this paper. For our implementations we used ForestClaw, which is publicly available on GitHub. We added the Active Flux method as a new solver in ForestClaw.
References
Barsukow, W.: Low mach number finite volume methods for the acoustic and euler equations. Doctoral thesis, Universität Würzburg (2018)
Barsukow, W.: Stationarity preservation properties of the active flux scheme on cartesian grids. Commun. Appl. Comput. (2020)
Barsukow, W.: The Active Flux scheme for nonlinear problems. J. Sci. Comput. 86(3), 1–34 (2021)
Barsukow, W., Berberich, J.P., Klingenberg, C.: On the active flux scheme for hyperbolic PDEs with source terms. SIAM J. Sci. Comput. 43, A4015–A4042 (2021)
Barsukow, W., Hohm, J., Klingenberg, C., Roe, P.L.: The active flux scheme on Cartesian grids and its low Mach number limit. J. Sci. Comput. 81(1), 594–622 (2019)
Berger, M.J., Colella, P.: Local adaptive mesh refinement for shock hydrodynamics. J. Comput. Phys. 82, 64–84 (1989)
Berger, M.J., LeVeque, R.J.: Adaptive mesh refinement using wavepropagation algorithms for hyperbolic systems. SIAM J. Numer. Anal. 35, 2298–2316 (1998)
Berger, M.J., Oliger, J.: Adaptive mesh refinement for hyperbolic partial differential equations. J. Comput. Phys. 53, 484–512 (1984)
Burstedde, C., Calhoun, D., Mandli, K., Terrel, A.R.: Forestclaw: hybrid forestofoctrees amr for hyperbolic conservation laws. Parallel Comput. Accel. Computat. Sci. Eng. (CSE) 25, 253–262 (2014)
Burstedde, C., Wilcox, L.C., Ghattas, O.: p4est: scalable algorithms for parallel adaptive mesh refinement on forests of octrees. SIAM J. Sci. Comput. 33, 1103–1133 (2011)
Calhoun, D., Burstedde, C.: Forestclaw software. http://www.forestclaw.org/ForestClaw/index.html
Calhoun, D., Burstedde, C.: ForestClaw: a parallel algorithm for patchbased adaptive mesh refinement on a forest of quadtrees (2017). arXiv:1703.03116
Chudzik, E., Helzel, C., Kerkmann, D.: The Cartesian grid active flux method: linear stability and bound preserving limiting. Appl. Math. Comput. 393, 125501, 19 (2021)
Courant, R., Hilbert, D.: Methods of Mathematical Physics, vol. 2. WileyVCH, New Jersey (1962)
Eymann, T.A., Roe, P.L.: Active flux schemes. AIAA. 2011382
Eymann, T.A., Roe, P.L.: Active flux schemes for systems. AIAA 20113840
Eymann, T.A., Roe, P.L.: Multidimensional active flux schemes. AIAA Conference Paper, June 2013
Fan, D., Roe, P.L.: Investigations of a new scheme for wave propagation. AIAA Aviation Forum, 2226 June 2015, Dallas, TX, 22nd AIAA Computational Fluid Dynamics Conference
Helzel, C., Kerkmann, D., Scandurra, L.: A new ADER method inspired by the active flux method. J. Sci. Comput. 80(3), 1463–1497 (2019)
LeVeque, R.J.: Finite Volume Methods for Hyperbolic Problems. Cambridge University Press, Cambridge (2002)
LukáčováMedvid’ová, M., Morton, K.W., Warnecke, G.: Evolution galerkin methods for hyperbolic systems in two space dimensions. Math. Comput. 69, 1355–1384 (2000)
LukáčováMedvid’ová, M., Saibertová, J., Warnecke, G.: Finite volume evolution Galerkin methods for nonlinear hyperbolic systems. J. Comput. Phys. 183, 533–562 (2002)
Roe, P.: Is discontinuous reconstruction really a good idea? J. Sci. Comput. 73(2–3), 1094–1114 (2017)
Roe, P.: Did numerical methods for hyperbolic problems take a wrong turning? In: Klingenberg, C., Westdickenberg, M. (eds.) Theory, Numerics and Applications of Hyperbolic Problems II, pp. 517–534. Springer, Cham (2018)
Roe, P.: Designing CFD methods for bandwidth  a physical approach. Comput. Fluids 214, 104774 (2021)
Roe, P.L., Maeng, J., Fan, D.: Comparing active flux and discontinuous galerkin methods for compressible flow. 2018 AIAA Aerospace Science Meeting
Zhang, W., Almgren, A., Beckner, V., Bell, J., Blaschke, J., Chan, C., Day, M., Friesen, B., Gott, K., Graves, D., Katz, M.P., Myers, A., Nguyen, T., Nonaka, A., Rosso, M., Williams, S., Zingale, M.: AMReX: a framework for blockstructured adaptive mesh refinement. J. Open Source Softw. 4(37), 1370 (2019)
Funding
Open Access funding enabled and organized by Projekt DEAL. This work was funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)  325695158. Furthermore, research was supported by a subcontract with Boise State University, Boise, ID, under DARPA Cooperative Agreement HR00112120003 with EmbryRiddle Aeronautical University, Daytona Beach, FL, USA. This work is approved for public release; distribution is unlimited. The content of the information does not necessarily reflect the position or the policy of the Government, and no official endorsement should be inferred.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors have not disclosed any competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Second Order Accuracy of the Active Flux Method which Exactly Preserves Constant States
Second Order Accuracy of the Active Flux Method which Exactly Preserves Constant States
In Sect. 4.3.2 we introduced an Active Flux method that preserves steady states for advective transport in a divergence free velocity field defined via a stream function. The method is based on the approximation (31), which was used in the definition of numerical fluxes (32) and (33). Here we prove second order accuracy of the method on uniform grids assuming that the solution is sufficiently smooth. For simplicity we assume \(\Delta x = \Delta y =: h\).
Let
with \(w_0 = w_2 = 1\) and \(w_1 = 4\), describe the difference between a flux computation using Simpson’s rule and the flux approximation (32). Analogously we define \(R_{i,j\pm \frac{1}{2}} := G_{i,j\pm \frac{1}{2}}^{Simpson}  G_{i,j\pm \frac{1}{2}}\).
We will show that
Thus, during each time step the cell average values computed with the method from Sect. 4.3.2 differ from the cell average values computed with the third order accurate Active Flux method by a term of order \({{{\mathcal {O}}}}(h^2)\). Since both \(F_{i \pm \frac{1}{2},j}^{Simpson}\) as well as (32) use Simpson’s rule for the integration in time, we only need to study the accuracy in space. Therefore, it is enough to show
where \(R^n\) describes the update due to the terms at level \(t_n\) only. To simplify notation we will in the following omit the argument \(t_n\). Using the finite difference approximations (29), \(R^n\) can be expressed in the form
Here we ordered the terms in four groups, which we denote with \(I_1\), \(I_2\), \(I_3\) and \(I_4\), respectively. We first expand \(I_1\) around \((x_{i+\frac{1}{2}},y_{j\frac{1}{2}})\), \(I_2\) around \((x_{i+\frac{1}{2}},y_{j+\frac{1}{2}})\), \(I_3\) around \((x_{i\frac{1}{2}},y_{j\frac{1}{2}})\) and \(I_4\) around \((x_{i\frac{1}{2}},y_{j+\frac{1}{2}})\). By ignoring higher order terms and omitting the argument for the \(\Psi \) terms, we obtain
Next we expand \(I_1 + I_2\) around \((x_{i+\frac{1}{2}},y_j)\) and \(I_3+I_4\) around \((x_{i\frac{1}{2}},y_j)\) and obtain, by again omitting the arguments in the \(\Psi \) terms,
In the final step we expand all the terms \(I_1,\ldots ,I_4\) around \((x_i,y_j)\) and obtain for the sum of the four terms
Thus, we have
i.e. the method, which exactly preserves constant states, is second order accurate.
In the special case of solid body rotation, the derivatives of \(\Psi \) arising in the leading order error term vanish and we obtain full third order accuracy.
In Table 5 we show a numerical convergence study for the smooth swirl flow test problem of Sect. 4.3.1 but at time \(t=0.1\) instead of \(t=1\). For this time instance we do not have an exact solution but compare the numerical solution on level 3 and 4 grids with a reference solution computed on a level 6 grid. For the method which exactly preserves constant states (right table) the convergence study confirms second order accuracy, while the classical Active Flux method (left table) is third order accurate.
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
Calhoun, D., Chudzik, E. & Helzel, C. The Cartesian Grid Active Flux Method with Adaptive Mesh Refinement. J Sci Comput 94, 54 (2023). https://doi.org/10.1007/s10915023021068
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10915023021068