Introduction
In this publication, we present the first fully discrete Active Flux method for Maxwell’s equations in three dimensions. In 2011, Roe and his former student Eymann introduced Active Flux methods for advection and acoustics in one and two dimensions [1 , 2 ] . For the simplest case of one-dimensional advection, the method agrees with van Leer’s method V from [3 ] . Its defining feature is a continuous reconstruction, which removes the need for Riemann solvers and allows the computation of numerical fluxes via Simpson’s rule. Roe later argued that third order represents a suitable candidate, being an odd-order method [4 ] with not too much complexity [5 ] . In one and two spatial dimensions, higher-order approximations have been considered [6 , 7 ] . In this publication we restrict ourselves to a third-order accurate method. Besides the cell-average values, Active Flux uses point values as additional degrees of freedom. These define the reconstruction and enter the numerical fluxes. The point values allow for a compact stencil in space and time while retaining third-order accuracy. This makes Active Flux methods attractive to parallelization and capable of achieving high accuracy on coarse grids owing to their low numerical dissipation. Interest in this method grew, with extensions to Cartesian grids [8 , 9 , 10 ] . With appropriate evolution operators for the point values, Active Flux presents a finite volume approach that tries to incorporate the true physics and achieves a numerical domain of dependence in close agreement with the physical one. Recent publications continue to address this matter by developing evolution operators for the Euler equations [11 , 12 , 13 , 14 ] . Although Active Flux was initially formulated as a fully discrete method, researchers have since developed semi-discrete methods. Among these are the method of Barsukow, Klingenberg and coworkers and their approach to the generalized Active Flux methods [7 , 15 , 16 ] , which have also been applied to the ideal MHD equations [17 ] , as well as Abgrall et al. who developed the PAMPA schemes that use the same underlying degrees of freedom [6 , 18 , 19 ] . Recently, works have been published that presented Active Flux methods for the Vlasov–Poisson and Vlasov–Maxwell systems [20 , 21 , 22 ] . In kinetic plasma models such as the Vlasov–Maxwell system, Maxwell’s equations describe the propagation of electromagnetic waves coupled to the Vlasov equation, which describes the evolution of a plasma [23 ] . In [22 ] the newly developed Active Flux methods for the Vlasov equation were combined with a classical Yee scheme to provide a new method for the Vlasov–Maxwell system. The authors showed that Active Flux methods for the Vlasov equation have significantly lower dissipation than the conservative PFC method [24 ] . This motivates our work, where we propose an Active Flux method for Maxwell’s equations in three dimensions. The main difficulty with such methods is constructing a suitable evolution operator. This can be resolved exactly using a multidimensional operator based on Kirchhoff’s formula. Combined with Active Flux’s low numerical dissipation, this promises high accuracy on coarse grids without the need for Riemann solvers or a separate time integration method.
The development of numerical methods for Maxwell’s equations has a long history. The most prominent method is the Yee scheme [25 , 26 ] , a second-order finite difference time-domain method employing a staggered grid in space and time. Many subsequent methods mimic the structure of the de Rham complex, starting from edge elements [27 ] . They evolve differential forms in function spaces chosen to respect the exterior calculus, following Arnold, Falk and Winther on finite element exterior calculus [28 ] . These structure-preserving discretizations include both finite difference [29 ] and finite element approaches [30 ] , but are typically semi-discrete in time, requiring a suitable time integration method. Alternatively, the divergence constraints can be controlled by divergence cleaning [31 ] or enforced locally by divergence-free basis functions in discontinuous Galerkin methods [32 ] .
In the present work we propose two fully discrete methods for Maxwell’s equations without source terms in three spatial dimensions. The first uses a tensor-product construction from lower dimensions, resulting in 27 degrees of freedom per cell for the second-degree polynomial reconstruction required for third-order accuracy. The time step is restricted by a CFL condition of 0.5 to maintain the compact stencil, and point values are evolved using a truly multidimensional exact evolution operator for the homogeneous Maxwell system. The evolution operator is derived from the wave equation and is based on Kirchhoff’s formula. This method preserves the divergence constraints only up to the truncation error of its reconstruction. The resulting divergence error stays bounded but does not vanish. This method is an extension of Active Flux methods to Maxwell’s equations in three dimensions. It relies on the previous ideas of evolution operators for wave dominated systems [11 , 12 , 13 , 33 , 34 ] and extends the ideas of Active Flux methods for Maxwell’s equations in two dimensions [11 ] to three dimensions. In 2D, Maxwell’s equations reduce to two sets of acoustic equations, where a discrete divergence is preserved by an exact evolution operator.
As the second method, we propose one that relies on the same evolution operator but has a reconstruction that is locally divergence-free. The reconstruction is based on the one derived by Balsara in [35 , 36 , 37 ] for MHD and applied to Maxwell’s equations in [38 , 39 ] . In that setting, the reconstruction is designed to be divergence-free for the magnetic field. In our proposed method, we adapt this reconstruction to both the electric and magnetic field, to obtain a divergence-free method for Maxwell’s equations. In [37 ] the reconstruction is built from facial moments, which are reconstructed from the face averages of neighboring faces. In our approach, we compute these remaining degrees of freedom from point values on the cell faces, which are evolved using the same evolution operator as in the classical Active Flux method. Since the reconstruction is not continuous, the curl in the evolution operator is understood in the distributional sense. We use appropriate finite difference methods to compute the facial moments from the face point values.
We update the face averages of B \mathbf{B} B and E \mathbf{E} E via Stokes’ theorem to maintain the divergence at machine precision. The arising edge integrals are approximated using appropriate quadrature rules from the evolved point values. The reconstruction is not continuous and does not interpolate point values on the boundaries. Consequently, point values on the boundary of a cell are not uniquely defined at time t n t_n t n . Therefore, we replace Simpson’s rule as the quadrature rule in time by a right Radau rule. This gives up the continuity of the reconstruction for the divergence-free property.
The article is structured as follows: § 2 introduces the Active Flux framework. Section 3 derives the evolution operators for Maxwell’s equations without source terms. § 6 presents the divergence-free method. Numerical experiments are presented in § 7 , and § 8 concludes this article.
Fully discrete Active Flux methods in three dimensions
To illustrate the formulation of Active Flux, we will derive the general form of the fully discrete method for a general three-dimensional conservation law on a domain Ω ⊂ R 3 \Omega\subset\mathbb{R}^{3} Ω ⊂ R 3 . Consider the vector of conserved quantities q : Ω × R + → R m \mathbf{q} : \Omega\times\mathbb{R}_{+} \to\mathbb{R}^{m} q : Ω × R + → R m with a flux function f \mathbf{f} f defined by f ( q ) : = ( f ( q ) , g ( q ) , h ( q ) ) : R m → R 3 × m \mathbf{f}(\mathbf{q}) := (f(\mathbf{q}),g(\mathbf{q}),h(\mathbf{q})) : \mathbb{R}^{m} \to\mathbb{R}^{3 \times m} f ( q ) := ( f ( q ) , g ( q ) , h ( q )) : R m → R 3 × m . Then the general conservation law is given by the following partial differential equation
∂ ∂ t q ( x , t ) + ∇ ⋅ f ( q ( x , t ) ) = 0 , (1) \frac{\partial}{\partial t}\mathbf{q}(\mathbf{x},t)+\nabla\cdot\mathbf{f}(\mathbf{q}(\mathbf{x},t))=0, \tag*{(1)} ∂ t ∂ q ( x , t ) + ∇ ⋅ f ( q ( x , t )) = 0 , (1)
q ( x , 0 ) = q 0 ( x ) , (2) \mathbf{q}(\mathbf{x},0)=\mathbf{q}_{0}(\mathbf{x}), \tag*{(2)} q ( x , 0 ) = q 0 ( x ) , (2)
with initial data q 0 ( x ) \mathbf{q}_{0}(\mathbf{x}) q 0 ( x ) and x ∈ Ω \mathbf{x} \in\Omega x ∈ Ω . We restrict our formulation of Active Flux to a Cartesian grid of Ω \Omega Ω with cells C i , j , k = [ x i − 1 2 , x i + 1 2 ] × [ y j − 1 2 , y j + 1 2 ] × [ z k − 1 2 , z k + 1 2 ] C_{i,j,k} = [x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}] \times[y_{j-\frac{1}{2}},y_{j+\frac{1}{2}}] \times[z_{k-\frac{1}{2}},z_{k+\frac{1}{2}}] C i , j , k = [ x i − 2 1 , x i + 2 1 ] × [ y j − 2 1 , y j + 2 1 ] × [ z k − 2 1 , z k + 2 1 ] , i = 1 , … , N x i = 1,\ldots,N_{x} i = 1 , … , N x , j = 1 , … , N y j = 1,\ldots,N_{y} j = 1 , … , N y , k = 1 , … , N z k = 1,\ldots,N_{z} k = 1 , … , N z and constant mesh widths Δ x = x i + 1 2 − x i − 1 2 \Delta x = x_{i+\frac{1}{2}} - x_{i-\frac{1}{2}} Δ x = x i + 2 1 − x i − 2 1 , Δ y = y j + 1 2 − y j − 1 2 \Delta y = y_{j+\frac{1}{2}} - y_{j-\frac{1}{2}} Δ y = y j + 2 1 − y j − 2 1 and Δ z = z k + 1 2 − z k − 1 2 \Delta z = z_{k+\frac{1}{2}} - z_{k-\frac{1}{2}} Δ z = z k + 2 1 − z k − 2 1 . Integrating (1) over one cell C i , j , k C_{i,j,k} C i , j , k , and a timestep [ t n , t n + 1 ] [t_{n},t_{n+1}] [ t n , t n + 1 ] with Δ t = t n + 1 − t n \Delta t = t_{n+1} - t_{n} Δ t = t n + 1 − t n , one obtains
0 = ∫ t n t n + 1 ∫ C i , j , k ∂ ∂ t q ( x , t ) + ∇ ⋅ f ( q ( x , t ) ) d x d t = ∫ C i , j , k q ( x , t n + 1 ) d x − ∫ C i , j , k q ( x , t n ) d x + ∫ t n t n + 1 ∫ C i , j , k ∇ ⋅ f ( q ( x , t ) ) d x d t . (3) \begin{aligned}
0 &= \int_{t_n}^{t_{n+1}}\int_{C_{i,j,k}}\frac{\partial}{\partial t}\mathbf{q}(\mathbf{x},t)+\nabla\cdot\mathbf{f}(\mathbf{q}(\mathbf{x},t))\,\mathrm{d}x\,\mathrm{d}t\\
&= \int_{C_{i,j,k}}\mathbf{q}(\mathbf{x},t_{n+1})\,\mathrm{d}x-\int_{C_{i,j,k}}\mathbf{q}(\mathbf{x},t_n)\,\mathrm{d}x\\
&\quad+\int_{t_n}^{t_{n+1}}\int_{C_{i,j,k}}\nabla\cdot\mathbf{f}(\mathbf{q}(\mathbf{x},t))\,\mathrm{d}x\,\mathrm{d}t. \tag*{(3)}
\end{aligned} 0 = ∫ t n t n + 1 ∫ C i , j , k ∂ t ∂ q ( x , t ) + ∇ ⋅ f ( q ( x , t )) d x d t = ∫ C i , j , k q ( x , t n + 1 ) d x − ∫ C i , j , k q ( x , t n ) d x + ∫ t n t n + 1 ∫ C i , j , k ∇ ⋅ f ( q ( x , t )) d x d t . (3)
Applying the divergence theorem with outer normal vector ν \boldsymbol{\nu} ν in the latter integral one obtains
∫ C i , j , k ∇ ⋅ f ( q ( x , t ) ) d x = ∫ ∂ C i , j , k f ( q ( x , t ) ) ⋅ ν d S x = ∫ C j , k 2 D f ( q ( x i + 1 2 , y , z , t ) ) d y d z − ∫ C j , k 2 D f ( q ( x i − 1 2 , y , z , t ) ) d y d z + ∫ C i , k 2 D g ( q ( x , y j + 1 2 , z , t ) ) d x d z − ∫ C i , k 2 D g ( q ( x , y j − 1 2 , z , t ) ) d x d z + ∫ C i , j 2 D h ( q ( x , y , z k + 1 2 , t ) ) d x d y − ∫ C i , j 2 D h ( q ( x , y , z k − 1 2 , t ) ) d x d y . (4) \begin{aligned}
\int_{C_{i,j,k}}\nabla\cdot\mathbf{f}(\mathbf{q}(\mathbf{x},t))\,\mathrm{d}x
&=\int_{\partial C_{i,j,k}}\mathbf{f}(\mathbf{q}(\mathbf{x},t))\cdot\boldsymbol{\nu}\,\mathrm{d}S_{\mathbf{x}}\\
&=\int_{C^{2D}_{j,k}}f(\mathbf{q}(x_{i+\frac{1}{2}},y,z,t))\,\mathrm{d}y\,\mathrm{d}z-\int_{C^{2D}_{j,k}}f(\mathbf{q}(x_{i-\frac{1}{2}},y,z,t))\,\mathrm{d}y\,\mathrm{d}z\\
&\quad+\int_{C^{2D}_{i,k}}g(\mathbf{q}(x,y_{j+\frac{1}{2}},z,t))\,\mathrm{d}x\,\mathrm{d}z-\int_{C^{2D}_{i,k}}g(\mathbf{q}(x,y_{j-\frac{1}{2}},z,t))\,\mathrm{d}x\,\mathrm{d}z\\
&\quad+\int_{C^{2D}_{i,j}}h(\mathbf{q}(x,y,z_{k+\frac{1}{2}},t))\,\mathrm{d}x\,\mathrm{d}y-\int_{C^{2D}_{i,j}}h(\mathbf{q}(x,y,z_{k-\frac{1}{2}},t))\,\mathrm{d}x\,\mathrm{d}y. \tag*{(4)}
\end{aligned} ∫ C i , j , k ∇ ⋅ f ( q ( x , t )) d x = ∫ ∂ C i , j , k f ( q ( x , t )) ⋅ ν d S x = ∫ C j , k 2 D f ( q ( x i + 2 1 , y , z , t )) d y d z − ∫ C j , k 2 D f ( q ( x i − 2 1 , y , z , t )) d y d z + ∫ C i , k 2 D g ( q ( x , y j + 2 1 , z , t )) d x d z − ∫ C i , k 2 D g ( q ( x , y j − 2 1 , z , t )) d x d z + ∫ C i , j 2 D h ( q ( x , y , z k + 2 1 , t )) d x d y − ∫ C i , j 2 D h ( q ( x , y , z k − 2 1 , t )) d x d y . (4)
with
C i , j 2 D : = [ x i − 1 2 , x i + 1 2 ] × [ y j − 1 2 , y j + 1 2 ] , C^{2D}_{i,j}:=[x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}]\times[y_{j-\frac{1}{2}},y_{j+\frac{1}{2}}], C i , j 2 D := [ x i − 2 1 , x i + 2 1 ] × [ y j − 2 1 , y j + 2 1 ] ,
C j , k 2 D : = [ y j − 1 2 , y j + 1 2 ] × [ z k − 1 2 , z k + 1 2 ] . C^{2D}_{j,k}:=[y_{j-\frac{1}{2}},y_{j+\frac{1}{2}}]\times[z_{k-\frac{1}{2}},z_{k+\frac{1}{2}}]. C j , k 2 D := [ y j − 2 1 , y j + 2 1 ] × [ z k − 2 1 , z k + 2 1 ] .
C i , k 2 D : = [ x i − 1 2 , x i + 1 2 ] × [ z k − 1 2 , z k + 1 2 ] . C^{2D}_{i,k} := [x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}] \times[z_{k-\frac{1}{2}},z_{k+\frac{1}{2}}]. C i , k 2 D := [ x i − 2 1 , x i + 2 1 ] × [ z k − 2 1 , z k + 2 1 ] .
Inserting (4) in (3) and with the cell average
Q ‾ i , j , k n ≈ 1 Δ x Δ y Δ z ∫ C i , j , k q ( x , t n ) d x (5) \overline{Q}^{n}_{i,j,k} \approx\frac{1}{\Delta x\Delta y\Delta z}\int_{C_{i,j,k}}q(x,t_n)\,\mathrm{d}x \tag*{(5)} Q i , j , k n ≈ Δ x Δ y Δ z 1 ∫ C i , j , k q ( x , t n ) d x (5)
and the numerical flux
F i + 1 2 , j , k ≈ 1 Δ y Δ z Δ t ∫ t n t n + 1 ∫ C i + 1 2 , k 2 D f ( q ( x i + 1 2 , y , z , t ) ) d z d y d t , (6) F_{i+\frac{1}{2},j,k} \approx\frac{1}{\Delta y\Delta z\Delta t}\int_{t_n}^{t_{n+1}}\int_{C^{2D}_{i+\frac{1}{2},k}}f(q(x_{i+\frac{1}{2}},y,z,t))\,\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}t, \tag*{(6)} F i + 2 1 , j , k ≈ Δ y Δ z Δ t 1 ∫ t n t n + 1 ∫ C i + 2 1 , k 2 D f ( q ( x i + 2 1 , y , z , t )) d z d y d t , (6)
as well as G i , j + 1 2 , k G_{i,j+\frac{1}{2},k} G i , j + 2 1 , k and H i , j , k + 1 2 H_{i,j,k+\frac{1}{2}} H i , j , k + 2 1 analogously, one obtains the update of the fully discrete method
Q ‾ i , j , k n + 1 = Q ‾ i , j , k n − Δ t Δ x ( F i + 1 2 , j , k − F i − 1 2 , j , k ) − Δ t Δ y ( G i , j + 1 2 , k − G i , j − 1 2 , k ) − Δ t Δ z ( H i , j , k + 1 2 − H i , j , k − 1 2 ) . \begin{aligned}
\overline{Q}^{n+1}_{i,j,k}={}&\overline{Q}^{n}_{i,j,k}-\frac{\Delta t}{\Delta x}\left(F_{i+\frac{1}{2},j,k}-F_{i-\frac{1}{2},j,k}\right)-\frac{\Delta t}{\Delta y}\left(G_{i,j+\frac{1}{2},k}-G_{i,j-\frac{1}{2},k}\right)\\
&-\frac{\Delta t}{\Delta z}\left(H_{i,j,k+\frac{1}{2}}-H_{i,j,k-\frac{1}{2}}\right).
\end{aligned} Q i , j , k n + 1 = Q i , j , k n − Δ x Δ t ( F i + 2 1 , j , k − F i − 2 1 , j , k ) − Δ y Δ t ( G i , j + 2 1 , k − G i , j − 2 1 , k ) − Δ z Δ t ( H i , j , k + 2 1 − H i , j , k − 2 1 ) .
While the update formula resembles an explicit Euler step, it is a fully discrete scheme: the numerical fluxes F F F , G G G , H H H approximate the flux integrals averaged over [ t n , t n + 1 ] [t_n,t_{n+1}] [ t n , t n + 1 ] via a quadrature rule, rather than evaluating the flux at a single time level. This distinguishes Active Flux from semi-discrete methods where the spatial operator is decoupled from time integration.
Degrees of freedom
Some classical finite volume methods achieve higher-order accuracy through reconstruction from cell averages alone, using wider stencils such as WENO [40 , 41 ] or employing correction terms as in wave propagation algorithms [42 , 43 ] . Active Flux methods instead introduce point values located on cell boundaries as additional degrees of freedom which are shared between adjacent cells, yielding a globally continuous reconstruction. Furthermore, these point values allow for a higher-order method while retaining a compact stencil in space and time. In our proposed methods we use cell average values, nodal point values and point values on the center of edges and faces. An illustration is given in Figure 1 . There the point values are depicted as circles, while the cell average is presented as a small cube in the center of the cell. We denote the nodal point values by
Figure 1. Configuration of degrees of freedom for a three-dimensional cell. Point values at the nodes (black), edge midpoints (red), face centers (violet) and cell average (yellow).
Q i ± 1 2 , j ± 1 2 , k ± 1 2 n ≈ q ( x i ± 1 2 , y j ± 1 2 , z k ± 1 2 , t n ) (7) Q^{n}_{i\pm\frac{1}{2},j\pm\frac{1}{2},k\pm\frac{1}{2}}\approx q(x_{i\pm\frac{1}{2}},y_{j\pm\frac{1}{2}},z_{k\pm\frac{1}{2}},t_n) \tag*{(7)} Q i ± 2 1 , j ± 2 1 , k ± 2 1 n ≈ q ( x i ± 2 1 , y j ± 2 1 , z k ± 2 1 , t n ) (7)
the edge-centered point values by
Q i , j ± 1 2 , k ± 1 2 n ≈ q ( x i , y j ± 1 2 , z k ± 1 2 , t n ) , (8) Q^{n}_{i,j\pm\frac{1}{2},k\pm\frac{1}{2}}\approx q(x_i,y_{j\pm\frac{1}{2}},z_{k\pm\frac{1}{2}},t_n), \tag*{(8)} Q i , j ± 2 1 , k ± 2 1 n ≈ q ( x i , y j ± 2 1 , z k ± 2 1 , t n ) , (8)
and Q i ± 1 2 , j , k ± 1 2 n Q^n_{i\pm\frac{1}{2},j,k\pm\frac{1}{2}} Q i ± 2 1 , j , k ± 2 1 n , Q i ± 1 2 , j ± 1 2 , k n Q^n_{i\pm\frac{1}{2},j\pm\frac{1}{2},k} Q i ± 2 1 , j ± 2 1 , k n , respectively, as well as the face-centered point values by
Q i , j ± 1 2 , k n ≈ q ( x i , y j ± 1 2 , z k , t n ) , (9) Q^n_{i,j\pm\frac{1}{2},k} \approx q\left(x_i,y_{j\pm\frac{1}{2}},z_k,t_n\right), \tag*{(9)} Q i , j ± 2 1 , k n ≈ q ( x i , y j ± 2 1 , z k , t n ) , (9)
and Q i ± 1 2 , j , k n Q^n_{i\pm\frac{1}{2},j,k} Q i ± 2 1 , j , k n , Q i , j , k ± 1 2 n Q^n_{i,j,k\pm\frac{1}{2}} Q i , j , k ± 2 1 n , respectively.
Numerical fluxes
In contrast to other finite volume methods, the numerical fluxes are direct approximations of the flux integrals (4) . The choice of quadrature rule in space is driven by the aspect that it should use all point values on the boundary. The time quadrature should be chosen such that the method is of higher order and not too complex so that point values can be evaluated without excessive computational cost. The canonical choice with this configuration of degrees of freedom is Simpson’s rule in space and time. In [1 ] , Roe justified this choice in the one-dimensional case by arguing that it yields a third-order accurate method in space and time. Point values at full time steps are used both for the reconstruction and flux computation. Hence, we will use for the numerical fluxes two-dimensional Simpson’s rule in space and one-dimensional Simpson’s rule in time as it is the canonical choice for the configuration of the degrees of freedom presented in Figure 1 . This gives the following representations of the numerical fluxes:
F i + 1 2 , j , k n = 1 6 ∑ ( δ j , δ k ) ω δ j , δ k ( f ( Q i + 1 2 , j + δ j , k + δ k n ) + 4 f ( Q i + 1 2 , j + δ j , k + δ k n + 1 2 ) + f ( Q i + 1 2 , j + δ j , k + δ k n + 1 ) ) , (10) F^n_{i+\frac{1}{2},j,k}=\frac{1}{6}\sum_{(\delta_j,\delta_k)}\omega_{\delta_j,\delta_k}\left(f\left(Q^n_{i+\frac{1}{2},j+\delta_j,k+\delta_k}\right)+4f\left(Q^{n+\frac{1}{2}}_{i+\frac{1}{2},j+\delta_j,k+\delta_k}\right)+f\left(Q^{n+1}_{i+\frac{1}{2},j+\delta_j,k+\delta_k}\right)\right), \tag*{(10)} F i + 2 1 , j , k n = 6 1 ( δ j , δ k ) ∑ ω δ j , δ k ( f ( Q i + 2 1 , j + δ j , k + δ k n ) + 4 f ( Q i + 2 1 , j + δ j , k + δ k n + 2 1 ) + f ( Q i + 2 1 , j + δ j , k + δ k n + 1 ) ) , (10)
with δ j , δ k ∈ { − 1 2 , 0 , 1 2 } \delta_j,\delta_k\in\left\{-\frac{1}{2},0,\frac{1}{2}\right\} δ j , δ k ∈ { − 2 1 , 0 , 2 1 } , ω δ j , δ k = ω δ j ω δ k \omega_{\delta_j,\delta_k}=\omega_{\delta_j}\omega_{\delta_k} ω δ j , δ k = ω δ j ω δ k and ω − 1 2 = ω 1 2 = 1 6 \omega_{-\frac{1}{2}}=\omega_{\frac{1}{2}}=\frac{1}{6} ω − 2 1 = ω 2 1 = 6 1 , ω 0 = 4 6 \omega_0=\frac{4}{6} ω 0 = 6 4 . The remaining numerical fluxes are approximated accordingly.
3D reconstruction
As the formulation of the numerical fluxes suggests, we rely on 26 point values in addition to the cell average. Those point values are shared between neighboring cells and thus the reconstruction is globally continuous. This stands in contrast to the majority of finite volume and discontinuous Galerkin methods [44 ] , which are based on discontinuities between adjacent cells. Consequently, Active Flux methods do not require any form of Riemann solver and the numerical fluxes can be computed as described above. Roe argued that Riemann solvers introduce one-dimensional physics and do not capture truly multidimensional wave behavior [5 ] . Active Flux instead relies on a globally continuous reconstruction and multidimensional evolution operators, which we discuss in the following subsection. To formulate the three-dimensional reconstruction within one cell, we initially consider the reconstruction over a one-dimensional cell [ x i − 1 2 , x i + 1 2 ] [x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}] [ x i − 2 1 , x i + 2 1 ] . With the coordinate transformation
ξ : = ξ ( x ) = 2 ( x − x i − 1 2 ) Δ x − 1 ∈ [ − 1 , 1 ] \xi:= \xi(x) = \frac{2\left(x-x_{i-\frac{1}{2}}\right)}{\Delta x}-1 \in[-1,1] ξ := ξ ( x ) = Δ x 2 ( x − x i − 2 1 ) − 1 ∈ [ − 1 , 1 ]
we use the three Lagrangian basis polynomials
ℓ ξ , − 1 2 = ξ ( ξ − 1 ) 2 , ℓ ξ , 0 = ( 1 − ξ 2 ) , ℓ ξ , 1 2 = ξ ( ξ + 1 ) 2 \ell_{\xi,-\frac{1}{2}}=\frac{\xi(\xi-1)}{2},\qquad\ell_{\xi,0}=(1-\xi^2),\qquad\ell_{\xi,\frac{1}{2}}=\frac{\xi(\xi+1)}{2} ℓ ξ , − 2 1 = 2 ξ ( ξ − 1 ) , ℓ ξ , 0 = ( 1 − ξ 2 ) , ℓ ξ , 2 1 = 2 ξ ( ξ + 1 )
that interpolate the left and right boundaries. Defining η ( y ) \eta(y) η ( y ) , ν ( z ) \nu(z) ν ( z ) and their corresponding Lagrangian polynomials ℓ η , ℓ ν \ell_{\eta},\ell_{\nu} ℓ η , ℓ ν we obtain, following the tensor-product approach
q i , j , k r e c , n ( ξ , η , ν ) = ∑ ( i ^ , j ^ , k ^ ) ∈ I Q i + i ^ , j + j ^ , k + k ^ n ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ + c ˉ i , j , k ℓ ξ , 0 ℓ η , 0 ℓ ν , 0 , q^{\mathrm{rec},n}_{i,j,k}(\xi,\eta,\nu)=\sum_{(\hat{i},\hat{j},\hat{k})\in\mathcal{I}}Q^{n}_{i+\hat{i},j+\hat{j},k+\hat{k}}\ell_{\xi,\hat{i}}\ell_{\eta,\hat{j}}\ell_{\nu,\hat{k}}+\bar{c}_{i,j,k}\ell_{\xi,0}\ell_{\eta,0}\ell_{\nu,0}, q i , j , k rec , n ( ξ , η , ν ) = ( i ^ , j ^ , k ^ ) ∈ I ∑ Q i + i ^ , j + j ^ , k + k ^ n ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ + c ˉ i , j , k ℓ ξ , 0 ℓ η , 0 ℓ ν , 0 ,
where the index set
I : = { − 1 2 , 0 , 1 2 } 3 ∖ { ( 0 , 0 , 0 ) } \mathcal{I}:=\left\{-\frac{1}{2},0,\frac{1}{2}\right\}^{3}\setminus\{(0,0,0)\} I := { − 2 1 , 0 , 2 1 } 3 ∖ {( 0 , 0 , 0 )}
enumerates the 26 point values on the boundary of C i , j , k C_{i,j,k} C i , j , k . The remaining tensor-product basis function ℓ ξ , 0 ℓ η , 0 ℓ ν , 0 \ell_{\xi,0}\ell_{\eta,0}\ell_{\nu,0} ℓ ξ , 0 ℓ η , 0 ℓ ν , 0 is not associated with a point value. Being the only one that vanishes on the whole cell boundary, it does not interfere with the interpolation of the point values, and its coefficient c ˉ i , j , k \bar{c}_{i,j,k} c ˉ i , j , k is instead determined by the cell average, i.e., c ˉ i , j , k \bar{c}_{i,j,k} c ˉ i , j , k is chosen such that
Q ‾ i , j , k n = 1 2 3 ∫ − 1 1 ∫ − 1 1 ∫ − 1 1 q i , j , k r e c , n ( ξ , η , ν ) d ξ d η d ν , \overline{Q}^{n}_{i,j,k}=\frac{1}{2^{3}}\int_{-1}^{1}\int_{-1}^{1}\int_{-1}^{1}q^{\mathrm{rec},n}_{i,j,k}(\xi,\eta,\nu)\,\mathrm{d}\xi\,\mathrm{d}\eta\,\mathrm{d}\nu, Q i , j , k n = 2 3 1 ∫ − 1 1 ∫ − 1 1 ∫ − 1 1 q i , j , k rec , n ( ξ , η , ν ) d ξ d η d ν ,
i.e.
c ˉ i , j , k = 27 8 ( Q i , j , k n − ∑ ( i ^ , j ^ , k ^ ) ∈ I ω i ^ ω j ^ ω k ^ Q i + i ^ , j + j ^ , k + k ^ n ) . \bar{c}_{i,j,k}=\frac{27}{8}\left(Q^n_{i,j,k}-\sum_{(\hat{i},\hat{j},\hat{k})\in\mathcal{I}}\omega_{\hat{i}}\omega_{\hat{j}}\omega_{\hat{k}}Q^n_{i+\hat{i},j+\hat{j},k+\hat{k}}\right). c ˉ i , j , k = 8 27 Q i , j , k n − ( i ^ , j ^ , k ^ ) ∈ I ∑ ω i ^ ω j ^ ω k ^ Q i + i ^ , j + j ^ , k + k ^ n .
Thus the used reconstruction fulfills the interpolation on every point value along the boundary of each cube and its average over the cell equals the cell-average.
Evolution operators
As one can see in the approximation of the numerical fluxes with Simpson’s rule, to make a fully discrete Active Flux method work, one has to be able to give reasonable approximations to the point values at intermediate time level t n + 1 2 t_{n+\frac{1}{2}} t n + 2 1 as well as full time level t n + 1 t_{n+1} t n + 1 . For the advection equation this is simple characteristic tracing. For more complex PDEs, such a simple approach is not available or diminishes the order of accuracy. In publications, different types of both exact and approximate evolution operators have been discussed [1 , 11 , 12 , 13 , 33 , 45 ] . So far they have exclusively been used in one- and two-dimensional Active Flux methods. Finding a suitable evolution operator is therefore the main difficulty in constructing fully discrete Active Flux methods. It should ensure that the higher order is not achieved by information from cells beyond the immediate stencil, and keep the stencil compact [4 ] . Additionally, a multidimensional evolution operator incorporates truly multidimensional physics into the method, i.e., it accounts for all local propagation directions derived directly from the PDE [11 ] .
The mathematical model
In this article, we consider the source-free Maxwell’s equations. They are given by the following system of partial differential equations.
∇ × E = − ∂ ∂ t B , (11) \nabla\times\boldsymbol{E}=-\frac{\partial}{\partial t}\boldsymbol{B}, \tag*{(11)} ∇ × E = − ∂ t ∂ B , (11)
∇ × B = μ 0 ε 0 ∂ ∂ t E , (12) \nabla\times\boldsymbol{B}=\mu_0\varepsilon_0\frac{\partial}{\partial t}\boldsymbol{E}, \tag*{(12)} ∇ × B = μ 0 ε 0 ∂ t ∂ E , (12)
∇ ⋅ E = 0 , (13) \nabla\cdot\boldsymbol{E}=0, \tag*{(13)} ∇ ⋅ E = 0 , (13)
∇ ⋅ B = 0. (14) \nabla\cdot\boldsymbol{B}=0. \tag*{(14)} ∇ ⋅ B = 0. (14)
Here, B , E : R 3 × R + → R 3 \boldsymbol{B},\boldsymbol{E}:\mathbb{R}^3\times\mathbb{R}^{+}\to\mathbb{R}^3 B , E : R 3 × R + → R 3 are the magnetic and electric field variables, μ 0 , ε 0 ∈ R + \mu_0,\varepsilon_0\in\mathbb{R}^{+} μ 0 , ε 0 ∈ R + are the permeability and permittivity satisfying the relation μ 0 ε 0 = c − 2 \mu_0\varepsilon_0=c^{-2} μ 0 ε 0 = c − 2 for the speed of light c c c . To apply the Active Flux method, we formulate the set of equations (11a–11b) in conservative form. Defining the vector
q ( x , t ) = ( B 1 ( x , t ) B 2 ( x , t ) B 3 ( x , t ) E 1 ( x , t ) E 2 ( x , t ) E 3 ( x , t ) ) ∈ R 6 , (15) q(x,t)=\begin{pmatrix} B_1(x,t) \\ B_2(x,t) \\ B_3(x,t) \\ E_1(x,t) \\ E_2(x,t) \\ E_3(x,t) \end{pmatrix}\in\mathbb{R}^6, \tag*{(15)} q ( x , t ) = B 1 ( x , t ) B 2 ( x , t ) B 3 ( x , t ) E 1 ( x , t ) E 2 ( x , t ) E 3 ( x , t ) ∈ R 6 , (15)
and the matrices
A 1 = ( 0 0 0 0 0 0 0 0 0 0 0 − 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 c 2 0 0 0 0 − c 2 0 0 0 0 ) , A 2 = ( 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 − 1 0 0 0 0 − c 2 0 0 0 0 0 0 0 0 0 c 2 0 0 0 0 0 ) , A_1=\begin{pmatrix} 0&0&0&0&0&0 \\ 0&0&0&0&0&-1 \\ 0&0&0&0&1&0 \\ 0&0&0&0&0&0 \\ 0&0&c^2&0&0&0 \\ 0&-c^2&0&0&0&0 \end{pmatrix},\qquad A_2=\begin{pmatrix} 0&0&0&0&0&1 \\ 0&0&0&0&0&0 \\ 0&0&0&-1&0&0 \\ 0&0&-c^2&0&0&0 \\ 0&0&0&0&0&0 \\ c^2&0&0&0&0&0 \end{pmatrix}, A 1 = 0 0 0 0 0 0 0 0 0 0 0 − c 2 0 0 0 0 c 2 0 0 0 0 0 0 0 0 0 1 0 0 0 0 − 1 0 0 0 0 , A 2 = 0 0 0 0 0 c 2 0 0 0 0 0 0 0 0 0 − c 2 0 0 0 0 − 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 ,
A 3 = ( 0 0 0 − 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 c 2 0 0 0 0 − c 2 0 0 0 0 0 0 0 0 0 0 0 ) , A_3=\begin{pmatrix} 0&0&0&-1&0&0 \\ 0&0&1&0&0&0 \\ 0&0&0&0&0&0 \\ 0&c^2&0&0&0&0 \\ -c^2&0&0&0&0&0 \\ 0&0&0&0&0&0 \end{pmatrix}, A 3 = 0 0 0 0 − c 2 0 0 0 0 c 2 0 0 0 1 0 0 0 0 − 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ,
we can formulate
∂ t q ( x , t ) + A 1 ∂ x q ( x , t ) + A 2 ∂ y q ( x , t ) + A 3 ∂ z q ( x , t ) = 0 , ∇ ⋅ E ( x , t ) = 0 , ∇ ⋅ B ( x , t ) = 0. (16) \partial_tq(x,t)+A_1\partial_xq(x,t)+A_2\partial_yq(x,t)+A_3\partial_zq(x,t)=0, \qquad\nabla\cdot E(x,t)=0,\quad\nabla\cdot B(x,t)=0. \tag*{(16)} ∂ t q ( x , t ) + A 1 ∂ x q ( x , t ) + A 2 ∂ y q ( x , t ) + A 3 ∂ z q ( x , t ) = 0 , ∇ ⋅ E ( x , t ) = 0 , ∇ ⋅ B ( x , t ) = 0. (16)
Now (16) allows the straightforward application of our Active Flux method. To give a full description of the method, we have to consider three things as mentioned in the previous section. These are the formulation of the numerical fluxes, the update of the point values, and the reconstruction. We do not discuss the reconstruction further for this method, as it follows directly from § 2 . Later, in § 6 , we will give a description of an alternative reconstruction that is locally divergence-free.
Numerical fluxes
First, we consider the cell-average update, that is, the description of the numerical flux. For the six-dimensional flux vector on an arbitrary three-dimensional cell C i , j , k = [ x i − 1 2 , x i + 1 2 ] × [ y j − 1 2 , y j + 1 2 ] × [ z k − 1 2 , z k + 1 2 ] C_{i,j,k}=[x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}]\times[y_{j-\frac{1}{2}},y_{j+\frac{1}{2}}]\times[z_{k-\frac{1}{2}},z_{k+\frac{1}{2}}] C i , j , k = [ x i − 2 1 , x i + 2 1 ] × [ y j − 2 1 , y j + 2 1 ] × [ z k − 2 1 , z k + 2 1 ] over a time step [ t n , t n + 1 ] [t_n,t_{n+1}] [ t n , t n + 1 ] , we have, as described in the previous section, for the face x i + 1 2 × [ y j − 1 2 , y j + 1 2 ] × [ z k − 1 2 , z k + 1 2 ] x_{i+\frac{1}{2}}\times[y_{j-\frac{1}{2}},y_{j+\frac{1}{2}}]\times[z_{k-\frac{1}{2}},z_{k+\frac{1}{2}}] x i + 2 1 × [ y j − 2 1 , y j + 2 1 ] × [ z k − 2 1 , z k + 2 1 ] of the cell C i , j , k C_{i,j,k} C i , j , k
1 Δ y Δ z Δ t ∫ t n t n + 1 ∫ y j − 1 2 y j + 1 2 ∫ z k − 1 2 z k + 1 2 A 1 q ( x i + 1 2 , y , z , t ) d z d y d t = 1 Δ y Δ z Δ t ( 0 − ∫ t n t n + 1 ∫ y j − 1 2 y j + 1 2 ∫ z k − 1 2 z k + 1 2 E 3 d z d y d t ∫ t n t n + 1 ∫ y j − 1 2 y j + 1 2 ∫ z k − 1 2 z k + 1 2 E 2 d z d y d t 0 c 2 ∫ t n t n + 1 ∫ y j − 1 2 y j + 1 2 ∫ z k − 1 2 z k + 1 2 B 3 d z d y d t − c 2 ∫ t n t n + 1 ∫ y j − 1 2 y j + 1 2 ∫ z k − 1 2 z k + 1 2 B 2 d z d y d t ) ≈ F i + 1 2 , j , k . (17) \frac{1}{\Delta y\Delta z\Delta t}\int_{t_n}^{t^{n+1}}\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}\mathbf{A}_1\mathbf{q}(x_{i+\frac{1}{2}},y,z,t)\,\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}t
=
\frac{1}{\Delta y\Delta z\Delta t}
\left(
\begin{array}{c}
0\\
-\int_{t_n}^{t^{n+1}}\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}E_3\,\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}t\\
\int_{t_n}^{t^{n+1}}\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}E_2\,\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}t\\
0\\
c^2\int_{t_n}^{t^{n+1}}\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}B_3\,\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}t\\
-c^2\int_{t_n}^{t^{n+1}}\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}B_2\,\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}t
\end{array}
\right)
\approx F_{i+\frac{1}{2},j,k}. \tag*{(17)} Δ y Δ z Δ t 1 ∫ t n t n + 1 ∫ y j − 2 1 y j + 2 1 ∫ z k − 2 1 z k + 2 1 A 1 q ( x i + 2 1 , y , z , t ) d z d y d t = Δ y Δ z Δ t 1 0 − ∫ t n t n + 1 ∫ y j − 2 1 y j + 2 1 ∫ z k − 2 1 z k + 2 1 E 3 d z d y d t ∫ t n t n + 1 ∫ y j − 2 1 y j + 2 1 ∫ z k − 2 1 z k + 2 1 E 2 d z d y d t 0 c 2 ∫ t n t n + 1 ∫ y j − 2 1 y j + 2 1 ∫ z k − 2 1 z k + 2 1 B 3 d z d y d t − c 2 ∫ t n t n + 1 ∫ y j − 2 1 y j + 2 1 ∫ z k − 2 1 z k + 2 1 B 2 d z d y d t ≈ F i + 2 1 , j , k . (17)
Over the face [ x i − 1 2 , x i + 1 2 ] × y j + 1 2 × [ z k − 1 2 , z k + 1 2 ] [x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}]\times y_{j+\frac{1}{2}}\times[z_{k-\frac{1}{2}},z_{k+\frac{1}{2}}] [ x i − 2 1 , x i + 2 1 ] × y j + 2 1 × [ z k − 2 1 , z k + 2 1 ] we have
G i , j + 1 2 , k ≈ 1 Δ x Δ z Δ t ( ∫ t n t n + 1 ∫ x i − 1 2 x i + 1 2 ∫ z k − 1 2 z k + 1 2 E 3 d z d x d t − ∫ t n t n + 1 ∫ x i − 1 2 x i + 1 2 ∫ z k − 1 2 z k + 1 2 E 1 d z d x d t 0 − c 2 ∫ t n t n + 1 ∫ x i − 1 2 x i + 1 2 ∫ z k − 1 2 z k + 1 2 B 3 d z d x d t 0 c 2 ∫ t n t n + 1 ∫ x i − 1 2 x i + 1 2 ∫ z k − 1 2 z k + 1 2 B 1 d z d x d t ) . (18) G_{i,j+\frac{1}{2},k}\approx\frac{1}{\Delta x\Delta z\Delta t}
\left(
\begin{array}{c}
\int_{t_n}^{t^{n+1}}\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}E_3\,\mathrm{d}z\,\mathrm{d}x\,\mathrm{d}t\\
-\int_{t_n}^{t^{n+1}}\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}E_1\,\mathrm{d}z\,\mathrm{d}x\,\mathrm{d}t\\
0\\
-c^2\int_{t_n}^{t^{n+1}}\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}B_3\,\mathrm{d}z\,\mathrm{d}x\,\mathrm{d}t\\
0\\
c^2\int_{t_n}^{t^{n+1}}\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}B_1\,\mathrm{d}z\,\mathrm{d}x\,\mathrm{d}t
\end{array}
\right). \tag*{(18)} G i , j + 2 1 , k ≈ Δ x Δ z Δ t 1 ∫ t n t n + 1 ∫ x i − 2 1 x i + 2 1 ∫ z k − 2 1 z k + 2 1 E 3 d z d x d t − ∫ t n t n + 1 ∫ x i − 2 1 x i + 2 1 ∫ z k − 2 1 z k + 2 1 E 1 d z d x d t 0 − c 2 ∫ t n t n + 1 ∫ x i − 2 1 x i + 2 1 ∫ z k − 2 1 z k + 2 1 B 3 d z d x d t 0 c 2 ∫ t n t n + 1 ∫ x i − 2 1 x i + 2 1 ∫ z k − 2 1 z k + 2 1 B 1 d z d x d t . (18)
and over the face [ x i − 1 2 , x i + 1 2 ] × [ y j − 1 2 , y j + 1 2 ] × z k + 1 2 [x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}]\times[y_{j-\frac{1}{2}},y_{j+\frac{1}{2}}]\times z_{k+\frac{1}{2}} [ x i − 2 1 , x i + 2 1 ] × [ y j − 2 1 , y j + 2 1 ] × z k + 2 1
H i , j , k + 1 2 ≈ 1 Δ x Δ y Δ t ( − ∫ t n t n + 1 ∫ x i − 1 2 x i + 1 2 ∫ y j − 1 2 y j + 1 2 E 2 d y d x d t ∫ t n t n + 1 ∫ x i − 1 2 x i + 1 2 ∫ y j − 1 2 y j + 1 2 E 1 d y d x d t 0 c 2 ∫ t n t n + 1 ∫ x i − 1 2 x i + 1 2 ∫ y j − 1 2 y j + 1 2 B 2 d y d x d t 0 − c 2 ∫ t n t n + 1 ∫ x i − 1 2 x i + 1 2 ∫ y j − 1 2 y j + 1 2 B 1 d y d x d t ) . (19) H_{i,j,k+\frac{1}{2}}\approx\frac{1}{\Delta x\Delta y\Delta t}
\left(
\begin{array}{c}
-\int_{t_n}^{t^{n+1}}\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}}\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}E_2\,\mathrm{d}y\,\mathrm{d}x\,\mathrm{d}t\\
\int_{t_n}^{t^{n+1}}\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}}\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}E_1\,\mathrm{d}y\,\mathrm{d}x\,\mathrm{d}t\\
0\\
c^2\int_{t_n}^{t^{n+1}}\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}}\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}B_2\,\mathrm{d}y\,\mathrm{d}x\,\mathrm{d}t\\
0\\
-c^2\int_{t_n}^{t^{n+1}}\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}}\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}B_1\,\mathrm{d}y\,\mathrm{d}x\,\mathrm{d}t
\end{array}
\right). \tag*{(19)} H i , j , k + 2 1 ≈ Δ x Δ y Δ t 1 − ∫ t n t n + 1 ∫ x i − 2 1 x i + 2 1 ∫ y j − 2 1 y j + 2 1 E 2 d y d x d t ∫ t n t n + 1 ∫ x i − 2 1 x i + 2 1 ∫ y j − 2 1 y j + 2 1 E 1 d y d x d t 0 c 2 ∫ t n t n + 1 ∫ x i − 2 1 x i + 2 1 ∫ y j − 2 1 y j + 2 1 B 2 d y d x d t 0 − c 2 ∫ t n t n + 1 ∫ x i − 2 1 x i + 2 1 ∫ y j − 2 1 y j + 2 1 B 1 d y d x d t . (19)
Finally, the numerical fluxes are approximated using a higher-order quadrature rule. We continue with the proposed method in the previous section and use Simpson’s rule. For one entry we have
1 Δ y Δ z Δ t ∫ t n t n + 1 ∫ y j − 1 2 y j + 1 2 ∫ z k − 1 2 z k + 1 2 E 3 ( x i + 1 2 , y , z , t ) d z d y d t ≈ 1 6 ∑ ( δ j , δ k ) ω δ j , δ k ( E 3 , i + 1 2 , j + δ j , k + δ k n + 4 E 3 , i + 1 2 , j + δ j , k + δ k n + 1 2 + E 3 , i + 1 2 , j + δ j , k + δ k n + 1 ) , \frac{1}{\Delta y\Delta z\Delta t}\int_{t_n}^{t^{n+1}}\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}E_3(x_{i+\frac{1}{2}},y,z,t)\,\mathrm{d}z\,\mathrm{d}y\,\mathrm{d}t
\approx\frac{1}{6}\sum_{(\delta_j,\delta_k)}\omega_{\delta_j,\delta_k}\left(E^{n}_{3,i+\frac{1}{2},j+\delta_j,k+\delta_k}+4E^{n+\frac{1}{2}}_{3,i+\frac{1}{2},j+\delta_j,k+\delta_k}+E^{n+1}_{3,i+\frac{1}{2},j+\delta_j,k+\delta_k}\right), Δ y Δ z Δ t 1 ∫ t n t n + 1 ∫ y j − 2 1 y j + 2 1 ∫ z k − 2 1 z k + 2 1 E 3 ( x i + 2 1 , y , z , t ) d z d y d t ≈ 6 1 ( δ j , δ k ) ∑ ω δ j , δ k ( E 3 , i + 2 1 , j + δ j , k + δ k n + 4 E 3 , i + 2 1 , j + δ j , k + δ k n + 2 1 + E 3 , i + 2 1 , j + δ j , k + δ k n + 1 ) ,
with δ j , δ k ∈ { − 1 2 , 0 , 1 2 } \delta_j,\delta_k \in\left\{-\frac{1}{2},0,\frac{1}{2}\right\} δ j , δ k ∈ { − 2 1 , 0 , 2 1 } , ω δ j , δ k = ω δ j ω δ k \omega_{\delta_j,\delta_k}=\omega_{\delta_j}\omega_{\delta_k} ω δ j , δ k = ω δ j ω δ k and ω − 1 2 = ω 1 2 = 1 6 \omega_{-\frac{1}{2}}=\omega_{\frac{1}{2}}=\frac{1}{6} ω − 2 1 = ω 2 1 = 6 1 , ω 0 = 4 6 \omega_0=\frac{4}{6} ω 0 = 6 4 . What remains is to find an evolution of the point values located on the respective faces of the three-dimensional cube [ x i − 1 2 , x i + 1 2 ] × [ y j − 1 2 , y j + 1 2 ] × [ z k − 1 2 , z k + 1 2 ] [x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}]\times[y_{j-\frac{1}{2}},y_{j+\frac{1}{2}}]\times[z_{k-\frac{1}{2}},z_{k+\frac{1}{2}}] [ x i − 2 1 , x i + 2 1 ] × [ y j − 2 1 , y j + 2 1 ] × [ z k − 2 1 , z k + 2 1 ] .
Update of point values
To discuss the direct procedure to update the point value degrees of freedom of this Active Flux method, we first derive an analytical formula. For the update of the point values, one can exploit the structure of the underlying PDE to update the point values independently [1 ] .
Analytical derivation of update formula
Following the ideas of Eymann and Roe [33 ] , we use the underlying structure of a wave equation for Maxwell’s equations. Applying the curl operator to Maxwell’s equations, we obtain
∇ × ( ∂ ∂ t B + ∇ × E ) = 0 ⇔ ∂ ∂ t ( ∇ × B ) + ∇ × ( ∇ × E ) = 0 , \nabla\times\left(\frac{\partial}{\partial t}B+\nabla\times E\right)=0 \Leftrightarrow\frac{\partial}{\partial t}(\nabla\times B)+\nabla\times(\nabla\times E)=0, ∇ × ( ∂ t ∂ B + ∇ × E ) = 0 ⇔ ∂ t ∂ ( ∇ × B ) + ∇ × ( ∇ × E ) = 0 ,
∇ × ( 1 c 2 ∂ ∂ t E − ∇ × B ) = 0 ⇔ 1 c 2 ∂ ∂ t ( ∇ × E ) − ∇ × ( ∇ × B ) = 0. \nabla\times\left(\frac{1}{c^2}\frac{\partial}{\partial t}E-\nabla\times B\right)=0 \Leftrightarrow\frac{1}{c^2}\frac{\partial}{\partial t}(\nabla\times E)-\nabla\times(\nabla\times B)=0. ∇ × ( c 2 1 ∂ t ∂ E − ∇ × B ) = 0 ⇔ c 2 1 ∂ t ∂ ( ∇ × E ) − ∇ × ( ∇ × B ) = 0.
Using (11) and (12) , the known identity ∇ × ∇ × V = ∇ ( ∇ ⋅ V ) − Δ V \nabla\times\nabla\times V=\nabla(\nabla\cdot V)-\Delta V ∇ × ∇ × V = ∇ ( ∇ ⋅ V ) − Δ V for the vector field V V V and the divergence constraints (13) , (14) , we get
1 c 2 ∂ 2 ∂ t 2 E + ∇ ( ∇ ⋅ E ) − Δ E = 0 ⇔ ∂ 2 ∂ t 2 E − c 2 Δ E = 0 (20) \frac{1}{c^2}\frac{\partial^2}{\partial t^2}E+\nabla(\nabla\cdot E)-\Delta E=0 \Leftrightarrow\frac{\partial^2}{\partial t^2}E-c^2\Delta E=0 \tag*{(20)} c 2 1 ∂ t 2 ∂ 2 E + ∇ ( ∇ ⋅ E ) − Δ E = 0 ⇔ ∂ t 2 ∂ 2 E − c 2 Δ E = 0 (20)
− 1 c 2 ∂ 2 ∂ t 2 B − ∇ ( ∇ ⋅ B ) + Δ B = 0 ⇔ ∂ 2 ∂ t 2 B − c 2 Δ B = 0. (21) -\frac{1}{c^2}\frac{\partial^2}{\partial t^2}B-\nabla(\nabla\cdot B)+\Delta B=0 \Leftrightarrow\frac{\partial^2}{\partial t^2}B-c^2\Delta B=0. \tag*{(21)} − c 2 1 ∂ t 2 ∂ 2 B − ∇ ( ∇ ⋅ B ) + Δ B = 0 ⇔ ∂ t 2 ∂ 2 B − c 2 Δ B = 0. (21)
So we transform Maxwell’s equations to the decoupled electromagnetic wave equations. To discuss the evolution of our point-values in time, we first recall how to solve a wave equation. Consider the following general wave equation for a function u u u .
∂ t t u ( x , t ) − c 2 Δ u ( x , t ) = 0 , \partial_{tt}u(x,t)-c^2\Delta u(x,t)=0, ∂ tt u ( x , t ) − c 2 Δ u ( x , t ) = 0 ,
∂ t u ( x , 0 ) = g ( x ) , \partial_tu(x,0)=g(x), ∂ t u ( x , 0 ) = g ( x ) ,
u ( x , 0 ) = h ( x ) . u(x,0)=h(x). u ( x , 0 ) = h ( x ) .
For this set of equations there is a classical solution
u ( x , t ) = ∂ t ( t M { h , x ; c t } ) + t M { g , x ; c t } (22) u(x,t)=\partial_t\left(tM\{h,x;ct\}\right)+tM\{g,x;ct\} \tag*{(22)} u ( x , t ) = ∂ t ( tM { h , x ; c t } ) + tM { g , x ; c t } (22)
given by Kirchhoff’s formula in three dimensions, see [46 ] . Here, M { f , x ; r } M\{f,x;r\} M { f , x ; r } is the spherical mean of a function f f f centered at x x x with radius r r r , i.e.,
M { f , x ; r } : = 1 4 π r 2 ∫ ∂ B r ( x ) f ( y ) d S y . (23) M\{f,x;r\} := \frac{1}{4\pi r^{2}}\int_{\partial B_r(x)} f(\boldsymbol{y})\,\mathrm{d}S_{\boldsymbol{y}}. \tag*{(23)} M { f , x ; r } := 4 π r 2 1 ∫ ∂ B r ( x ) f ( y ) d S y . (23)
Here, ∂ B r ( x ) \partial B_r(x) ∂ B r ( x ) is the boundary of the ball of radius r r r centered at x x x and d S y \mathrm{d}S_{\boldsymbol{y}} d S y is the area element on the surface of the ball. In this three-dimensional setting, we use the transformation of the surface integral with spherical coordinates
M { f , x ; r } = 1 4 π ∫ 0 2 π ∫ 0 π f ( x + r sin ( ϕ ) cos ( θ ) , y + r sin ( ϕ ) sin ( θ ) , z + r cos ( ϕ ) ) sin ( ϕ ) d ϕ d θ . M\{f,x;r\} = \frac{1}{4\pi}\int_{0}^{2\pi}\int_{0}^{\pi} f(x+r\sin(\phi)\cos(\theta),y+r\sin(\phi)\sin(\theta),z+r\cos(\phi))\sin(\phi)\,\mathrm{d}\phi\,\mathrm{d}\theta. M { f , x ; r } = 4 π 1 ∫ 0 2 π ∫ 0 π f ( x + r sin ( ϕ ) cos ( θ ) , y + r sin ( ϕ ) sin ( θ ) , z + r cos ( ϕ )) sin ( ϕ ) d ϕ d θ .
In total we can formulate the following two sets of wave equations for the magnetic field
∂ 2 ∂ t 2 B − c 2 Δ B = 0 , ∂ ∂ t B ( x , 0 ) = − ∇ × E ( x , 0 ) , B ( x , 0 ) = B 0 ( x ) , (24) \begin{aligned}
\frac{\partial^{2}}{\partial t^{2}}\boldsymbol{B}-c^{2}\Delta\boldsymbol{B} &= 0,\\
\frac{\partial}{\partial t}\boldsymbol{B}(x,0) &= -\nabla\times\boldsymbol{E}(x,0),\\
\boldsymbol{B}(x,0) &= \boldsymbol{B}_{0}(x), \tag*{(24)}
\end{aligned} ∂ t 2 ∂ 2 B − c 2 Δ B ∂ t ∂ B ( x , 0 ) B ( x , 0 ) = 0 , = − ∇ × E ( x , 0 ) , = B 0 ( x ) , (24)
and for the electric field,
∂ 2 ∂ t 2 E − c 2 Δ E = 0 , ∂ ∂ t E ( x , 0 ) = c 2 ∇ × B ( x , 0 ) , E ( x , 0 ) = E 0 ( x ) . (25) \begin{aligned}
\frac{\partial^{2}}{\partial t^{2}}\boldsymbol{E}-c^{2}\Delta\boldsymbol{E} &= 0,\\
\frac{\partial}{\partial t}\boldsymbol{E}(x,0) &= c^{2}\nabla\times\boldsymbol{B}(x,0),\\
\boldsymbol{E}(x,0) &= \boldsymbol{E}_{0}(x). \tag*{(25)}
\end{aligned} ∂ t 2 ∂ 2 E − c 2 Δ E ∂ t ∂ E ( x , 0 ) E ( x , 0 ) = 0 , = c 2 ∇ × B ( x , 0 ) , = E 0 ( x ) . (25)
For sufficiently smooth solutions of the wave equations with divergence-free initial data, one can show ∂ t ∇ ⋅ B = 0 \partial_t\nabla\cdot\boldsymbol{B}=0 ∂ t ∇ ⋅ B = 0 and ∂ t ∇ ⋅ E = 0 \partial_t\nabla\cdot\boldsymbol{E}=0 ∂ t ∇ ⋅ E = 0 . Therefore, numerical methods based on exact evolution operators for the wave equation are interesting candidates for structure–preserving methods. Following the wave equation ansatz from above, we can derive with (22) and (24) the update formula for the components B m B_m B m , m = 1 , 2 , 3 m=1,2,3 m = 1 , 2 , 3 ,
B m ( x , t ) = ∂ t ( t M { ( B 0 ) m , x ; c t } ) + t M { − ( ∇ × E 0 ) m , x ; c t } = M { ( B 0 ) m , x ; c t } + t ∂ t M { ( B 0 ) m , x ; c t } − t M { ( ∇ × E 0 ) m , x ; c t } . \begin{aligned}
B_m(x,t) &= \partial_t\left(tM\{(B_0)_m,x;ct\}\right)+tM\{-(\nabla\times E_0)_m,x;ct\}\\
&=M\{(B_0)_m,x;ct\}+t\partial_tM\{(B_0)_m,x;ct\}-tM\{(\nabla\times E_0)_m,x;ct\}.
\end{aligned} B m ( x , t ) = ∂ t ( tM {( B 0 ) m , x ; c t } ) + tM { − ( ∇ × E 0 ) m , x ; c t } = M {( B 0 ) m , x ; c t } + t ∂ t M {( B 0 ) m , x ; c t } − tM {( ∇ × E 0 ) m , x ; c t } .
Defining c t = : R ct=:R c t =: R and following the calculation from Eymann and Roe in [33 ] , we can rewrite the second term by a change of variables and obtain
t ∂ t M { ( B 0 ) m , x ; R } = t ∂ R M { ( B 0 ) m , x ; R } ∂ R ∂ t = R ∂ R M { ( B 0 ) m , x ; R } . t\partial_tM\{(B_0)_m,x;R\}=t\partial_RM\{(B_0)_m,x;R\}\frac{\partial R}{\partial t}=R\partial_RM\{(B_0)_m,x;R\}. t ∂ t M {( B 0 ) m , x ; R } = t ∂ R M {( B 0 ) m , x ; R } ∂ t ∂ R = R ∂ R M {( B 0 ) m , x ; R } .
With these calculations, we get the evolution formula
B m ( x , t ) = M { ( B 0 ) m , x ; R } + R ∂ R M { ( B 0 ) m , x ; R } − t M { ( ∇ × E 0 ) m , x ; R } . (26) B_m(\mathbf{x},t)=M\{(\mathbf{B}_0)_m,\mathbf{x};R\}+R\partial_RM\{(\mathbf{B}_0)_m,\mathbf{x};R\}-tM\{(\nabla\times\mathbf{E}_0)_m,\mathbf{x};R\}. \tag*{(26)} B m ( x , t ) = M {( B 0 ) m , x ; R } + R ∂ R M {( B 0 ) m , x ; R } − tM {( ∇ × E 0 ) m , x ; R } . (26)
Following the same arguments, one derives the formula for the electric field
E m ( x , t ) = M { ( E 0 ) m , x ; R } + R ∂ R M { ( E 0 ) m , x ; R } + c 2 t M { ( ∇ × B 0 ) m , x ; R } . (27) E_m(\mathbf{x},t)=M\{(\mathbf{E}_0)_m,\mathbf{x};R\}+R\partial_RM\{(\mathbf{E}_0)_m,\mathbf{x};R\}+c^2tM\{(\nabla\times\mathbf{B}_0)_m,\mathbf{x};R\}. \tag*{(27)} E m ( x , t ) = M {( E 0 ) m , x ; R } + R ∂ R M {( E 0 ) m , x ; R } + c 2 tM {( ∇ × B 0 ) m , x ; R } . (27)
Discrete update of point values
Using the derived evolution formula, we demonstrate the update of a point value located at x x x on the boundary of the cell C i , j , k C_{i,j,k} C i , j , k . Using the previously derived formulas with R = c Δ t R=c\Delta t R = c Δ t , we proceed as follows:
B m ; i ± 1 2 , j ± 1 2 , k ± 1 2 n + 1 = M { B m n , x ; R } + R ∂ R M { B m n , x ; R } − Δ t M { ( ∇ × E n ) m , x ; R } , B^{n+1}_{m;i\pm\frac{1}{2},j\pm\frac{1}{2},k\pm\frac{1}{2}}=M\{B^n_m,\mathbf{x};R\}+R\partial_RM\{B^n_m,\mathbf{x};R\}-\Delta tM\{(\nabla\times\mathbf{E}^n)_m,\mathbf{x};R\}, B m ; i ± 2 1 , j ± 2 1 , k ± 2 1 n + 1 = M { B m n , x ; R } + R ∂ R M { B m n , x ; R } − Δ tM {( ∇ × E n ) m , x ; R } ,
and
E m ; i ± 1 2 , j ± 1 2 , k ± 1 2 n + 1 = M { E m n , x ; R } + R ∂ R M { E m n , x ; R } + c 2 Δ t M { ( ∇ × B n ) m , x ; R } . E^{n+1}_{m;i\pm\frac{1}{2},j\pm\frac{1}{2},k\pm\frac{1}{2}}=M\{E^n_m,\mathbf{x};R\}+R\partial_RM\{E^n_m,\mathbf{x};R\}+c^2\Delta tM\{(\nabla\times\mathbf{B}^n)_m,\mathbf{x};R\}. E m ; i ± 2 1 , j ± 2 1 , k ± 2 1 n + 1 = M { E m n , x ; R } + R ∂ R M { E m n , x ; R } + c 2 Δ tM {( ∇ × B n ) m , x ; R } .
for m = 1 , 2 , 3 m = 1,2,3 m = 1 , 2 , 3 . Here, B m ; i ± 1 2 , j ± 1 2 , k ± 1 2 n + 1 ≈ B m ( x , t n + 1 ) B^{n+1}_{m;i\pm\frac{1}{2},j\pm\frac{1}{2},k\pm\frac{1}{2}}\approx B_m(\mathbf{x},t_{n+1}) B m ; i ± 2 1 , j ± 2 1 , k ± 2 1 n + 1 ≈ B m ( x , t n + 1 ) and E m ; i ± 1 2 , j ± 1 2 , k ± 1 2 n + 1 ≈ E m ( x , t n + 1 ) E^{n+1}_{m;i\pm\frac{1}{2},j\pm\frac{1}{2},k\pm\frac{1}{2}}\approx E_m(\mathbf{x},t_{n+1}) E m ; i ± 2 1 , j ± 2 1 , k ± 2 1 n + 1 ≈ E m ( x , t n + 1 ) , while B m n \mathbf{B}^n_m B m n and E m n \mathbf{E}^n_m E m n denote the globally continuous reconstructions of the m m m -th component of the magnetic and electric fields for m = 1 , 2 , 3 m = 1,2,3 m = 1 , 2 , 3 , and B n , E n \mathbf{B}^n,\mathbf{E}^n B n , E n are the vectors of reconstructions. Now, to update a point-value used in our method, we need to consider the three different cases from above. First, the general calculation of a spherical mean of one component of a field, second, the derivative of the spherical mean with respect to the radius R R R , and third, the spherical mean of a partial derivative of a field component.
Approximation of spherical means
For simplicity, we demonstrate the calculations for an arbitrary function q q q and its associated reconstruction q r e c q^{\mathrm{rec}} q rec at time t n t_n t n , interpolating the 26 point values Q i + i ^ , j + j ^ , k + k ^ n Q^n_{i+\hat{i},j+\hat{j},k+\hat{k}} Q i + i ^ , j + j ^ , k + k ^ n , ( i ^ , j ^ , k ^ ) ∈ I (\hat{i},\hat{j},\hat{k})\in\mathcal{I} ( i ^ , j ^ , k ^ ) ∈ I , on the boundary and conserving the cell average Q ‾ i , j , k n \overline{Q}^n_{i,j,k} Q i , j , k n in C i , j , k C_{i,j,k} C i , j , k , as described in § 2 . For the general computation of a spherical mean of a piecewise-defined reconstruction, we decompose the integral over the entire sphere into integrals over spherical wedges on cells on which the reconstruction is locally defined. Thus, the spherical mean of q q q is the sum of integrals over wedges W ‾ i ˉ , j ˉ , k ˉ \overline{W}^{\bar{i},\bar{j},\bar{k}} W i ˉ , j ˉ , k ˉ
M { q , x ; R } = ∑ i ˉ , j ˉ , k ˉ M W ‾ i ˉ , j ˉ , k ˉ { q , x ; R } , M\{q,\mathbf{x};R\}=\sum_{\bar{i},\bar{j},\bar{k}}M^{\overline{W}^{\bar{i},\bar{j},\bar{k}}}\{q,\mathbf{x};R\}, M { q , x ; R } = i ˉ , j ˉ , k ˉ ∑ M W i ˉ , j ˉ , k ˉ { q , x ; R } ,
where, in this three-dimensional setting, we associate the spherical-wedge W i ˉ , j ˉ , k ˉ W^{\bar{i},\bar{j},\bar{k}} W i ˉ , j ˉ , k ˉ to ( ϕ min i ˉ , j ˉ , k ˉ , ϕ max i ˉ , j ˉ , k ˉ ) × ( θ min i ˉ , j ˉ , k ˉ , θ max i ˉ , j ˉ , k ˉ ) (\phi_{\min}^{\bar{i},\bar{j},\bar{k}},\phi_{\max}^{\bar{i},\bar{j},\bar{k}})\times(\theta_{\min}^{\bar{i},\bar{j},\bar{k}},\theta_{\max}^{\bar{i},\bar{j},\bar{k}}) ( ϕ m i n i ˉ , j ˉ , k ˉ , ϕ m a x i ˉ , j ˉ , k ˉ ) × ( θ m i n i ˉ , j ˉ , k ˉ , θ m a x i ˉ , j ˉ , k ˉ ) and
M W i ˉ , j ˉ , k ˉ { q , x ; R } : = 1 4 π ∫ θ min i ˉ , j ˉ , k ˉ θ max i ˉ , j ˉ , k ˉ ∫ ϕ min i ˉ , j ˉ , k ˉ ϕ max i ˉ , j ˉ , k ˉ q ( x + R sin ( ϕ ) cos ( θ ) , y + R sin ( ϕ ) sin ( θ ) , z + R cos ( ϕ ) ) sin ( ϕ ) d ϕ d θ . M^{W^{\bar{i},\bar{j},\bar{k}}}\{q,\boldsymbol{x};R\}:=\frac{1}{4\pi}\int_{\theta_{\min}^{\bar{i},\bar{j},\bar{k}}}^{\theta_{\max}^{\bar{i},\bar{j},\bar{k}}}\int_{\phi_{\min}^{\bar{i},\bar{j},\bar{k}}}^{\phi_{\max}^{\bar{i},\bar{j},\bar{k}}}q\left(x+R\sin(\phi)\cos(\theta),\right.
\\
\left.y+R\sin(\phi)\sin(\theta),\right.
\\
\left.z+R\cos(\phi)\right)\sin(\phi)\,\mathrm{d}\phi\,\mathrm{d}\theta. M W i ˉ , j ˉ , k ˉ { q , x ; R } := 4 π 1 ∫ θ m i n i ˉ , j ˉ , k ˉ θ m a x i ˉ , j ˉ , k ˉ ∫ ϕ m i n i ˉ , j ˉ , k ˉ ϕ m a x i ˉ , j ˉ , k ˉ q ( x + R sin ( ϕ ) cos ( θ ) , y + R sin ( ϕ ) sin ( θ ) , z + R cos ( ϕ ) ) sin ( ϕ ) d ϕ d θ .
When it comes to integrating the reconstruction q r e c q^{rec} q r ec , we first consider the coordinate transformations arising from the arguments above
ξ = ξ ( ϕ , θ , R , x ) = 2 x + R sin ( ϕ ) cos ( θ ) − x ˉ i ˉ − 1 2 Δ x − 1 , η = η ( ϕ , θ , R , y ) = 2 y + R sin ( ϕ ) sin ( θ ) − y ˉ j ˉ − 1 2 Δ y − 1 , ν = ν ( ϕ , R , z ) = 2 z + R cos ( ϕ ) − z ˉ k ˉ − 1 2 Δ z − 1. \begin{aligned}
\xi&=\xi(\phi,\theta,R,x)=2\frac{x+R\sin(\phi)\cos(\theta)-\bar{x}_{\bar{i}-\frac{1}{2}}}{\Delta x}-1,\\
\eta&=\eta(\phi,\theta,R,y)=2\frac{y+R\sin(\phi)\sin(\theta)-\bar{y}_{\bar{j}-\frac{1}{2}}}{\Delta y}-1,\\
\nu&=\nu(\phi,R,z)=2\frac{z+R\cos(\phi)-\bar{z}_{\bar{k}-\frac{1}{2}}}{\Delta z}-1.
\end{aligned} ξ η ν = ξ ( ϕ , θ , R , x ) = 2 Δ x x + R sin ( ϕ ) cos ( θ ) − x ˉ i ˉ − 2 1 − 1 , = η ( ϕ , θ , R , y ) = 2 Δ y y + R sin ( ϕ ) sin ( θ ) − y ˉ j ˉ − 2 1 − 1 , = ν ( ϕ , R , z ) = 2 Δ z z + R cos ( ϕ ) − z ˉ k ˉ − 2 1 − 1.
that entail the dependencies on ϕ \phi ϕ , θ \theta θ and R R R . The spherical mean of q r e c q^{rec} q r ec centered at the point ( x , y , z ) (x,y,z) ( x , y , z ) , coinciding with the position of a point value on the boundary, and radius R R R , is given by
M { q r e c , n , ( x , y , z ) ; R } = ∑ i ˉ , j ˉ , k ˉ M W i ˉ , j ˉ , k ˉ { q r e c , n , ( x , y , z ) ; R } = 1 4 π ∑ i ˉ , j ˉ , k ˉ ∫ W i ˉ , j ˉ , k ˉ ( ∑ ( i ^ , j ^ , k ^ ) ∈ I Q i ˉ + i ^ , j ˉ + j ^ , k ˉ + k ^ n ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ + c ˉ i ˉ , j ˉ , k ˉ ℓ ξ , 0 ℓ η , 0 ℓ ν , 0 ) sin ( ϕ ) d ϕ d θ = 1 4 π ∑ i ˉ , j ˉ , k ˉ ( ∑ ( i ^ , j ^ , k ^ ) ∈ I Q i ˉ + i ^ , j ˉ + j ^ , k ˉ + k ^ n ∫ W i ˉ , j ˉ , k ˉ ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ sin ( ϕ ) d ϕ d θ + c ˉ i ˉ , j ˉ , k ˉ ∫ W i ˉ , j ˉ , k ˉ ℓ ξ , 0 ℓ η , 0 ℓ ν , 0 sin ( ϕ ) d ϕ d θ ) = 1 4 π d n ( x , y , z ) T ℓ ( R ) . (28) \begin{aligned}
M\{q^{rec,n},(x,y,z);R\}
&=\sum_{\bar{i},\bar{j},\bar{k}}M^{W^{\bar{i},\bar{j},\bar{k}}}\{q^{rec,n},(x,y,z);R\}\\
&=\frac{1}{4\pi}\sum_{\bar{i},\bar{j},\bar{k}}\int_{W^{\bar{i},\bar{j},\bar{k}}}\left(\sum_{(\hat{i},\hat{j},\hat{k})\in\mathcal{I}}Q^{n}_{\bar{i}+\hat{i},\bar{j}+\hat{j},\bar{k}+\hat{k}}\ell_{\xi,\hat{i}}\ell_{\eta,\hat{j}}\ell_{\nu,\hat{k}}\right.\\
&\qquad\left.+\bar{c}_{\bar{i},\bar{j},\bar{k}}\ell_{\xi,0}\ell_{\eta,0}\ell_{\nu,0}\right)\sin(\phi)\,\mathrm{d}\phi\,\mathrm{d}\theta\\
&=\frac{1}{4\pi}\sum_{\bar{i},\bar{j},\bar{k}}\left(\sum_{(\hat{i},\hat{j},\hat{k})\in\mathcal{I}}Q^{n}_{\bar{i}+\hat{i},\bar{j}+\hat{j},\bar{k}+\hat{k}}\int_{W^{\bar{i},\bar{j},\bar{k}}}\ell_{\xi,\hat{i}}\ell_{\eta,\hat{j}}\ell_{\nu,\hat{k}}\sin(\phi)\,\mathrm{d}\phi\,\mathrm{d}\theta\right.\\
&\qquad\left.+\bar{c}_{\bar{i},\bar{j},\bar{k}}\int_{W^{\bar{i},\bar{j},\bar{k}}}\ell_{\xi,0}\ell_{\eta,0}\ell_{\nu,0}\sin(\phi)\,\mathrm{d}\phi\,\mathrm{d}\theta\right)\\
&=\frac{1}{4\pi}\boldsymbol{d}^{n}(x,y,z)^{T}\boldsymbol{\ell}(R). \tag*{(28)}
\end{aligned} M { q r ec , n , ( x , y , z ) ; R } = i ˉ , j ˉ , k ˉ ∑ M W i ˉ , j ˉ , k ˉ { q r ec , n , ( x , y , z ) ; R } = 4 π 1 i ˉ , j ˉ , k ˉ ∑ ∫ W i ˉ , j ˉ , k ˉ ( i ^ , j ^ , k ^ ) ∈ I ∑ Q i ˉ + i ^ , j ˉ + j ^ , k ˉ + k ^ n ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ + c ˉ i ˉ , j ˉ , k ˉ ℓ ξ , 0 ℓ η , 0 ℓ ν , 0 ) sin ( ϕ ) d ϕ d θ = 4 π 1 i ˉ , j ˉ , k ˉ ∑ ( i ^ , j ^ , k ^ ) ∈ I ∑ Q i ˉ + i ^ , j ˉ + j ^ , k ˉ + k ^ n ∫ W i ˉ , j ˉ , k ˉ ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ sin ( ϕ ) d ϕ d θ + c ˉ i ˉ , j ˉ , k ˉ ∫ W i ˉ , j ˉ , k ˉ ℓ ξ , 0 ℓ η , 0 ℓ ν , 0 sin ( ϕ ) d ϕ d θ ) = 4 π 1 d n ( x , y , z ) T ℓ ( R ) . (28)
where d n ( x , y , z ) \boldsymbol{d}^{n}(x,y,z) d n ( x , y , z ) denotes the vector of all degrees of freedom associated with the point ( x , y , z ) (x,y,z) ( x , y , z ) , i.e., the point values and the coefficients of all adjacent cells, and ℓ ( R ) \boldsymbol{\ell}(R) ℓ ( R ) the vector of the associated integrated basis functions, which depends only on R = c Δ t R=c\Delta t R = c Δ t . The integration reduces to integrating trigonometric polynomials, which we carried out beforehand analytically using SymPy. Thus, updating the point values requires recomputing ℓ ( R ) \boldsymbol{\ell}(R) ℓ ( R ) and evaluating this product.
For the derivatives ∂ R M { q r e c , n , x ; R } \partial_R M\{q^{rec,n},x;R\} ∂ R M { q r ec , n , x ; R } we have with the notation from above
∂ R M { q r e c , n , x ; R } = 1 4 π d m ( x , y , z ) T ∂ R ℓ ( R ) , (29) \partial_R M\{q^{rec,n},x;R\}=\frac{1}{4\pi}d^m(x,y,z)^T\partial_R\ell(R), \tag*{(29)} ∂ R M { q r ec , n , x ; R } = 4 π 1 d m ( x , y , z ) T ∂ R ℓ ( R ) , (29)
where the differentiation is component-wise. The vector ∂ R ℓ ( R ) \partial_R\ell(R) ∂ R ℓ ( R ) is computed analytically beforehand using SymPy as well. For the differentiation with respect to x , y , z x,y,z x , y , z one must apply the chain rule. We have
∂ x ( ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ ) = ℓ ξ , i ^ ′ ℓ η , j ^ ℓ ν , k ^ = ℓ ξ , i ^ ′ 2 Δ x ℓ η , j ^ ℓ ν , k ^ . \partial_x(\ell_{\xi,\hat{i}}\ell_{\eta,\hat{j}}\ell_{\nu,\hat{k}})=\ell'_{\xi,\hat{i}}\ell_{\eta,\hat{j}}\ell_{\nu,\hat{k}}=\ell'_{\xi,\hat{i}}\frac{2}{\Delta x}\ell_{\eta,\hat{j}}\ell_{\nu,\hat{k}}. ∂ x ( ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ ) = ℓ ξ , i ^ ′ ℓ η , j ^ ℓ ν , k ^ = ℓ ξ , i ^ ′ Δ x 2 ℓ η , j ^ ℓ ν , k ^ .
Now we plug this polynomial into the expression (28) . Analogously for the other two derivatives ∂ y ( ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ ) \partial_y(\ell_{\xi,\hat{i}}\ell_{\eta,\hat{j}}\ell_{\nu,\hat{k}}) ∂ y ( ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ ) and ∂ z ( ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ ) \partial_z(\ell_{\xi,\hat{i}}\ell_{\eta,\hat{j}}\ell_{\nu,\hat{k}}) ∂ z ( ℓ ξ , i ^ ℓ η , j ^ ℓ ν , k ^ ) . These give us the last terms in the evolution formulas (26) and (27) .
A natural bound of the time step Δ t \Delta t Δ t by the CFL condition is given by the fact that we only want to integrate over the cells adjacent to the point value. This means that C F L ≤ 1 2 \mathrm{CFL}\leq\frac{1}{2} CFL ≤ 2 1 is necessary to keep the stencil compact, i.e., R = c Δ t ≤ 1 2 min ( Δ x , Δ y , Δ z ) R=c\Delta t\leq\frac{1}{2}\min(\Delta x,\Delta y,\Delta z) R = c Δ t ≤ 2 1 min ( Δ x , Δ y , Δ z ) . For two-dimensional Active Flux methods for the acoustic equations this condition is also sufficient for stability [11 ] . Our numerical results indicate that the same holds for the three-dimensional method presented here.
One time step of the method is summarized in Algorithm 1.
Algorithm 1 Active Flux method of Section 3.
Reconstruct B i , j , k r e c , n B^{rec,n}_{i,j,k} B i , j , k r ec , n and E i , j , k r e c , n E^{rec,n}_{i,j,k} E i , j , k r ec , n on every cell (Section 2).
Evolve point values: B n + 1 2 B^{n+\frac{1}{2}} B n + 2 1 , E n + 1 2 E^{n+\frac{1}{2}} E n + 2 1 , B n + 1 B^{n+1} B n + 1 and E n + 1 E^{n+1} E n + 1 from (26) , (27) with R = 1 2 c Δ t R=\frac{1}{2}c\Delta t R = 2 1 c Δ t and R = c Δ t R=c\Delta t R = c Δ t .
Numerical fluxes: Compute F i + 1 2 , j , k F_{i+\frac{1}{2},j,k} F i + 2 1 , j , k , G i , j + 1 2 , k G_{i,j+\frac{1}{2},k} G i , j + 2 1 , k , H i , j , k + 1 2 H_{i,j,k+\frac{1}{2}} H i , j , k + 2 1 with Simpson’s rule in space and time from the face point values at t n t_n t n , t n + 1 2 t_{n+\frac{1}{2}} t n + 2 1 and t n + 1 t_{n+1} t n + 1 .
Update cell averages: With Q ‾ i , j , k = ( B ‾ i , j , k , E ‾ i , j , k ) T \overline{Q}_{i,j,k}=(\overline{B}_{i,j,k},\overline{E}_{i,j,k})^T Q i , j , k = ( B i , j , k , E i , j , k ) T
Q ‾ i , j , k n + 1 = Q ‾ i , j , k n − Δ t Δ x ( F i + 1 2 , j , k − F i − 1 2 , j , k ) − Δ t Δ y ( G i , j + 1 2 , k − G i , j − 1 2 , k ) − Δ t Δ z ( H i , j , k + 1 2 − H i , j , k − 1 2 ) . \overline{Q}^{n+1}_{i,j,k}=\overline{Q}^{n}_{i,j,k}-\frac{\Delta t}{\Delta x}\left(F_{i+\frac{1}{2},j,k}-F_{i-\frac{1}{2},j,k}\right)-\frac{\Delta t}{\Delta y}\left(G_{i,j+\frac{1}{2},k}-G_{i,j-\frac{1}{2},k}\right)
-\frac{\Delta t}{\Delta z}\left(H_{i,j,k+\frac{1}{2}}-H_{i,j,k-\frac{1}{2}}\right). Q i , j , k n + 1 = Q i , j , k n − Δ x Δ t ( F i + 2 1 , j , k − F i − 2 1 , j , k ) − Δ y Δ t ( G i , j + 2 1 , k − G i , j − 2 1 , k ) − Δ z Δ t ( H i , j , k + 2 1 − H i , j , k − 2 1 ) .
A divergence-free method based on the Active Flux approach
The method described in the previous section is an extension of the previous Active Flux methods in 2D for acoustics or the Euler equations to Maxwell’s equations. Although the continuous evolution operators (26) , (27) preserve ∇ ⋅ B = 0 \nabla\cdot B=0 ∇ ⋅ B = 0 and ∇ ⋅ E = 0 \nabla\cdot E=0 ∇ ⋅ E = 0 for sufficiently smooth initial data, the reconstruction q r e c , n q^{rec,n} q r ec , n used in that method does not satisfy a discrete divergence-free property. In the following we present an alternative method for Maxwell’s equations that is divergence-free by construction and uses fewer degrees of freedom. For this approach we follow the ideas of [36 , 37 ] for divergence-free reconstructions in finite volume schemes for the ideal MHD equations. While Balsara proposed his approaches for MHD, they have been applied to Maxwell’s equations as well [38 , 39 ] . Note that in this source-free regime we apply the same ideas to the electric field as well as to the magnetic field. Besides the divergence-free property, one of the main differences between the method from Section 3 and the one in this section is the reconstruction and its degrees of freedom. The new method uses degrees of freedom that are defined on the faces of the cells. We still rely on point values on the cell boundary to evolve the solution in time, but we no longer use them as degrees of freedom for the reconstruction. This differs from Active Flux methods, which use point values on the cell boundary, possibly together with their derivatives, and cell averages as degrees of freedom.
Divergence-free reconstruction
The building blocks of the divergence-free reconstruction are the degrees of freedom. Instead of placing the degrees of freedom as nodes on the boundary of each cell, we use degrees of freedom that are defined on the faces of the cells for each component. On a cell we consider the following faces
S i − 1 2 , j , k x : = { x i − 1 2 } × [ y j − 1 2 , y j + 1 2 ] × [ z k − 1 2 , z k + 1 2 ] , S i , j − 1 2 , k y : = [ x i − 1 2 , x i + 1 2 ] × { y j − 1 2 } × [ z k − 1 2 , z k + 1 2 ] , S i , j , k − 1 2 z : = [ x i − 1 2 , x i + 1 2 ] × [ y j − 1 2 , y j + 1 2 ] × { z k − 1 2 } . (30) \begin{aligned}
S^{x}_{i-\frac{1}{2},j,k} &:= \{x_{i-\frac{1}{2}}\} \times[y_{j-\frac{1}{2}},y_{j+\frac{1}{2}}] \times[z_{k-\frac{1}{2}},z_{k+\frac{1}{2}}],\\
S^{y}_{i,j-\frac{1}{2},k} &:= [x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}] \times\{y_{j-\frac{1}{2}}\} \times[z_{k-\frac{1}{2}},z_{k+\frac{1}{2}}],\\
S^{z}_{i,j,k-\frac{1}{2}} &:= [x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}] \times[y_{j-\frac{1}{2}},y_{j+\frac{1}{2}}] \times\{z_{k-\frac{1}{2}}\}. \tag*{(30)}
\end{aligned} S i − 2 1 , j , k x S i , j − 2 1 , k y S i , j , k − 2 1 z := { x i − 2 1 } × [ y j − 2 1 , y j + 2 1 ] × [ z k − 2 1 , z k + 2 1 ] , := [ x i − 2 1 , x i + 2 1 ] × { y j − 2 1 } × [ z k − 2 1 , z k + 2 1 ] , := [ x i − 2 1 , x i + 2 1 ] × [ y j − 2 1 , y j + 2 1 ] × { z k − 2 1 } . (30)
As basis polynomials we use the same ones as in [37 ] , rescaled to the interval [ − 1 , 1 ] [-1,1] [ − 1 , 1 ] . Those are given by the following Legendre polynomials
P 0 ( ξ ) = 1 , P 1 ( ξ ) = ξ , P 2 ( ξ ) = ξ 2 − 1 3 , P 3 ( ξ ) = ξ 3 − 3 5 ξ . (31) P_0(\xi)=1,\qquad P_1(\xi)=\xi,\qquad P_2(\xi)=\xi^2-\frac{1}{3},\qquad P_3(\xi)=\xi^3-\frac{3}{5}\xi. \tag*{(31)} P 0 ( ξ ) = 1 , P 1 ( ξ ) = ξ , P 2 ( ξ ) = ξ 2 − 3 1 , P 3 ( ξ ) = ξ 3 − 5 3 ξ . (31)
For the face S i − 1 2 , j , k x S^x_{i-\frac{1}{2},j,k} S i − 2 1 , j , k x we use the following ansatz in the reference space [ − 1 , 1 ] 2 [-1,1]^2 [ − 1 , 1 ] 2 to describe B 1 B_1 B 1
B 1 ( − 1 , η , ν ) = B 0 x , − P 0 ( η ) P 0 ( ν ) + B y x , − P 1 ( η ) P 0 ( ν ) + B z x , − P 0 ( η ) P 1 ( ν ) + B y y x , − P 2 ( η ) P 0 ( ν ) + B y z x , − P 1 ( η ) P 1 ( ν ) + B z z x , − P 0 ( η ) P 2 ( ν ) . (32) \begin{aligned}
B_1(-1,\eta,\nu)={}&B^{x,-}_0P_0(\eta)P_0(\nu)+B^{x,-}_yP_1(\eta)P_0(\nu)+B^{x,-}_zP_0(\eta)P_1(\nu)\\
&+B^{x,-}_{yy}P_2(\eta)P_0(\nu)+B^{x,-}_{yz}P_1(\eta)P_1(\nu)+B^{x,-}_{zz}P_0(\eta)P_2(\nu). \tag*{(32)}
\end{aligned} B 1 ( − 1 , η , ν ) = B 0 x , − P 0 ( η ) P 0 ( ν ) + B y x , − P 1 ( η ) P 0 ( ν ) + B z x , − P 0 ( η ) P 1 ( ν ) + B y y x , − P 2 ( η ) P 0 ( ν ) + B y z x , − P 1 ( η ) P 1 ( ν ) + B z z x , − P 0 ( η ) P 2 ( ν ) . (32)
This approach is applied analogously to the face S i + 1 2 , j , k x S^x_{i+\frac{1}{2},j,k} S i + 2 1 , j , k x , the faces S i , j − 1 2 , k y S^y_{i,j-\frac{1}{2},k} S i , j − 2 1 , k y and S i , j + 1 2 , k y S^y_{i,j+\frac{1}{2},k} S i , j + 2 1 , k y for B 2 B_2 B 2 and S i , j , k − 1 2 z S^z_{i,j,k-\frac{1}{2}} S i , j , k − 2 1 z and S i , j , k + 1 2 z S^z_{i,j,k+\frac{1}{2}} S i , j , k + 2 1 z for B 3 B_3 B 3 . In our approach, we approximate these coefficients using updated point values on these faces. For each component of the magnetic or electric field, we carry six degrees of freedom. On the face S i − 1 2 , j , k x S^x_{i-\frac{1}{2},j,k} S i − 2 1 , j , k x , we approximate the coefficients of (29) from the point values B 1 ( − 1 , p , q ) B_1(-1,p,q) B 1 ( − 1 , p , q ) , p , q ∈ { − 1 , 0 , 1 } p,q \in\{-1,0,1\} p , q ∈ { − 1 , 0 , 1 } , by
B 0 x , − ≈ 1 4 ∫ − 1 1 ∫ − 1 1 B 1 ( − 1 , η , ν ) d η d ν , \mathcal{B}^{x,-}_{0} \approx\frac{1}{4}\int_{-1}^{1}\int_{-1}^{1} B_{1}(-1,\eta,\nu)\,\mathrm{d}\eta\,\mathrm{d}\nu, B 0 x , − ≈ 4 1 ∫ − 1 1 ∫ − 1 1 B 1 ( − 1 , η , ν ) d η d ν ,
B y x , − : = 1 2 ( B 1 ( − 1 , 1 , 0 ) − B 1 ( − 1 , − 1 , 0 ) ) ≈ ∂ η B 1 ∣ ( − 1 , 0 , 0 ) , \mathcal{B}^{x,-}_{y} := \frac{1}{2}\left(B_{1}(-1,1,0)-B_{1}(-1,-1,0)\right) \approx\left.\partial_{\eta}B_{1}\right|_{(-1,0,0)}, B y x , − := 2 1 ( B 1 ( − 1 , 1 , 0 ) − B 1 ( − 1 , − 1 , 0 ) ) ≈ ∂ η B 1 ∣ ( − 1 , 0 , 0 ) ,
B z x , − : = 1 2 ( B 1 ( − 1 , 0 , 1 ) − B 1 ( − 1 , 0 , − 1 ) ) ≈ ∂ ν B 1 ∣ ( − 1 , 0 , 0 ) , \mathcal{B}^{x,-}_{z} := \frac{1}{2}\left(B_{1}(-1,0,1)-B_{1}(-1,0,-1)\right) \approx\left.\partial_{\nu}B_{1}\right|_{(-1,0,0)}, B z x , − := 2 1 ( B 1 ( − 1 , 0 , 1 ) − B 1 ( − 1 , 0 , − 1 ) ) ≈ ∂ ν B 1 ∣ ( − 1 , 0 , 0 ) ,
B y y x , − : = 1 2 ( B 1 ( − 1 , 1 , 0 ) − 2 B 1 ( − 1 , 0 , 0 ) + B 1 ( − 1 , − 1 , 0 ) ) ≈ 1 2 ∂ η 2 B 1 ∣ ( − 1 , 0 , 0 ) , \mathcal{B}^{x,-}_{yy} := \frac{1}{2}\left(B_{1}(-1,1,0)-2B_{1}(-1,0,0)+B_{1}(-1,-1,0)\right) \approx\left.\frac{1}{2}\partial_{\eta}^{2}B_{1}\right|_{(-1,0,0)}, B y y x , − := 2 1 ( B 1 ( − 1 , 1 , 0 ) − 2 B 1 ( − 1 , 0 , 0 ) + B 1 ( − 1 , − 1 , 0 ) ) ≈ 2 1 ∂ η 2 B 1 ( − 1 , 0 , 0 ) ,
B z z x , − : = 1 2 ( B 1 ( − 1 , 0 , 1 ) − 2 B 1 ( − 1 , 0 , 0 ) + B 1 ( − 1 , 0 , − 1 ) ) ≈ 1 2 ∂ ν 2 B 1 ∣ ( − 1 , 0 , 0 ) , \mathcal{B}^{x,-}_{zz} := \frac{1}{2}\left(B_{1}(-1,0,1)-2B_{1}(-1,0,0)+B_{1}(-1,0,-1)\right) \approx\left.\frac{1}{2}\partial_{\nu}^{2}B_{1}\right|_{(-1,0,0)}, B z z x , − := 2 1 ( B 1 ( − 1 , 0 , 1 ) − 2 B 1 ( − 1 , 0 , 0 ) + B 1 ( − 1 , 0 , − 1 ) ) ≈ 2 1 ∂ ν 2 B 1 ( − 1 , 0 , 0 ) ,
B y z x , − : = 1 4 ( B 1 ( − 1 , 1 , 1 ) − B 1 ( − 1 , 1 , − 1 ) − B 1 ( − 1 , − 1 , 1 ) + B 1 ( − 1 , − 1 , − 1 ) ) ≈ ∂ η ∂ ν B 1 ∣ ( − 1 , 0 , 0 ) . (33) \begin{aligned}
\mathcal{B}^{x,-}_{yz} &:= \frac{1}{4}\left(B_{1}(-1,1,1)-B_{1}(-1,1,-1)-B_{1}(-1,-1,1)+B_{1}(-1,-1,-1)\right)\\
&\approx\left.\partial_{\eta}\partial_{\nu}B_{1}\right|_{(-1,0,0)}. \tag*{(33)}
\end{aligned} B y z x , − := 4 1 ( B 1 ( − 1 , 1 , 1 ) − B 1 ( − 1 , 1 , − 1 ) − B 1 ( − 1 , − 1 , 1 ) + B 1 ( − 1 , − 1 , − 1 ) ) ≈ ∂ η ∂ ν B 1 ∣ ( − 1 , 0 , 0 ) . (33)
Analogously for the coefficients on the face S i , j − 1 2 , k y S^{y}_{i,j-\frac{1}{2},k} S i , j − 2 1 , k y for B 2 B_{2} B 2 and S i , j , k − 1 2 z S^{z}_{i,j,k-\frac{1}{2}} S i , j , k − 2 1 z for B 3 B_{3} B 3 . Note that the face average B 0 x , − \mathcal{B}^{x,-}_{0} B 0 x , − is usually initialized by a vector potential in order to preserve the divergence-free property, however in some cases it suffices to initialize it by Simpson’s rule from the point values on the face. The remaining coefficients are computed from the point values on the face, which are evolved in time by the evolution operator (26) with the curl taken in the distributional sense, see (43) . Besides the fact that this approach leads to a divergence-free reconstruction, it also reduces the number of degrees of freedom. For a field we now have to store 3 faces with 6 degrees of freedom each, since each face is shared by two cells, giving a total of 18 facial degrees of freedom per field. Counted in the same way, the method of Section 3 stores 24 degrees of freedom for each field per cell. Given the facial reconstruction, we use the following ansatz for the reconstruction of a component of the magnetic field inside a cell
B 1 r e c ( ξ , η , ν ) = a 0 + a x ξ + a y η + a z ν + a x x P 2 ( ξ ) + a y y P 2 ( η ) + a z z P 2 ( ν ) + a x y ξ η + a x z ξ ν + a y z η ν + a x y z ξ η ν + a x y y ξ P 2 ( η ) + a x z z ξ P 2 ( ν ) + a x x y P 2 ( ξ ) η + a x x z P 2 ( ξ ) ν + a x x x P 3 ( ξ ) , (34) \begin{aligned}
B^{\mathrm{rec}}_{1}(\xi,\eta,\nu) ={}& a_{0}+a_{x}\xi+a_{y}\eta+a_{z}\nu+a_{xx}P_{2}(\xi)+a_{yy}P_{2}(\eta)+a_{zz}P_{2}(\nu)\\
&+a_{xy}\xi\eta+a_{xz}\xi\nu+a_{yz}\eta\nu+a_{xyz}\xi\eta\nu\\
&+a_{xyy}\xi P_{2}(\eta)+a_{xzz}\xi P_{2}(\nu)+a_{xxy}P_{2}(\xi)\eta\\
&+a_{xxz}P_{2}(\xi)\nu+a_{xxx}P_{3}(\xi), \tag*{(34)}
\end{aligned} B 1 rec ( ξ , η , ν ) = a 0 + a x ξ + a y η + a z ν + a xx P 2 ( ξ ) + a y y P 2 ( η ) + a z z P 2 ( ν ) + a x y ξ η + a x z ξ ν + a y z η ν + a x y z ξ η ν + a x y y ξ P 2 ( η ) + a x z z ξ P 2 ( ν ) + a xx y P 2 ( ξ ) η + a xx z P 2 ( ξ ) ν + a xxx P 3 ( ξ ) , (34)
for ξ , η , ν ∈ [ − 1 , 1 ] \xi,\eta,\nu\in[-1,1] ξ , η , ν ∈ [ − 1 , 1 ] . The reconstructions of B 2 r e c B^{\mathrm{rec}}_{2} B 2 rec and B 3 r e c B^{\mathrm{rec}}_{3} B 3 rec are given in Appendix § 9 , one obtains them by the cyclic permutations. By matching the reconstruction B 1 r e c B^{\mathrm{rec}}_{1} B 1 rec , B 2 r e c B^{\mathrm{rec}}_{2} B 2 rec and B 3 r e c B^{\mathrm{rec}}_{3} B 3 rec to their facial reconstructions as given above in (32) and requiring that the divergence is constant in each cell,
∂ ξ B 1 r e c + ∂ η B 2 r e c + ∂ ν B 3 r e c ≡ c o n s t , (35) \partial_{\xi}B^{\mathrm{rec}}_{1}+\partial_{\eta}B^{\mathrm{rec}}_{2}+\partial_{\nu}B^{\mathrm{rec}}_{3}\equiv\mathrm{const}, \tag*{(35)} ∂ ξ B 1 rec + ∂ η B 2 rec + ∂ ν B 3 rec ≡ const , (35)
one obtains the desired reconstruction. The value of this constant is not specified. It follows from the reconstruction and is computed in § 6.2 . For completeness, we list the resulting coefficients for our rescaling onto [ − 1 , 1 ] 3 [-1,1]^{3} [ − 1 , 1 ] 3 in Appendix B.
Update of the facial degrees of freedom via Stokes’ theorem
Computing the divergence of the reconstruction (34) yields
∇ ( ξ , η , ν ) ⋅ B r e c = 1 2 ( B 0 x , + − B 0 x , − + B 0 y , + − B 0 y , − + B 0 z , + − B 0 z , − ) (36) \nabla_{(\xi,\eta,\nu)} \cdot\mathbf{B}^{rec} = \frac{1}{2}\left(B_{0}^{x,+} - B_{0}^{x,-} + B_{0}^{y,+} - B_{0}^{y,-} + B_{0}^{z,+} - B_{0}^{z,-}\right) \tag*{(36)} ∇ ( ξ , η , ν ) ⋅ B r ec = 2 1 ( B 0 x , + − B 0 x , − + B 0 y , + − B 0 y , − + B 0 z , + − B 0 z , − ) (36)
in each cell. This expression is a discrete version of Gauss’ law for both the magnetic and electric fields. Hence the divergence of the reconstruction vanishes if and only if the right-hand side of (36) vanishes, i.e. if the face averages satisfy the discrete Gauss law. Consequently, controlling the divergence of the numerical solution reduces entirely to controlling (36) . To ensure that (36) remains zero for all times, one needs to compute the facial averages obeying Stokes’ theorem. In the following we will describe how we update the facial averages such that the divergence-free property is preserved. Multiplying (11) with the normal vector n x \mathbf{n}_x n x and integrating over the face S i − 1 2 , j , k S_{i-\frac{1}{2},j,k} S i − 2 1 , j , k yields
d d t ∫ S i − 1 2 , j , k x B ⋅ n x d S = − ∫ S i − 1 2 , j , k x ( ∇ × E ) ⋅ n x d S = − ∫ y j − 1 2 y j + 1 2 ∫ z k − 1 2 z k + 1 2 ( ∂ y E 3 − ∂ z E 2 ) d z d y = − ∫ z k − 1 2 z k + 1 2 E 3 ( x i − 1 2 , y j + 1 2 , z , t ) d z + ∫ z k − 1 2 z k + 1 2 E 3 ( x i − 1 2 , y j − 1 2 , z , t ) d z + ∫ y j − 1 2 y j + 1 2 E 2 ( x i − 1 2 , y , z k + 1 2 , t ) d y − ∫ y j − 1 2 y j + 1 2 E 2 ( x i − 1 2 , y , z k − 1 2 , t ) d y . (37) \begin{aligned}
\frac{\mathrm{d}}{\mathrm{d}t}\int_{S_{i-\frac{1}{2},j,k}^{x}} \mathbf{B}\cdot\mathbf{n}_x\,\mathrm{d}S
&= -\int_{S_{i-\frac{1}{2},j,k}^{x}}(\nabla\times\mathbf{E})\cdot\mathbf{n}_x\,\mathrm{d}S \\
&= -\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}(\partial_y E_3-\partial_z E_2)\,\mathrm{d}z\,\mathrm{d}y \\
&= -\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}E_3\left(x_{i-\frac{1}{2}},y_{j+\frac{1}{2}},z,t\right)\,\mathrm{d}z+\int_{z_{k-\frac{1}{2}}}^{z_{k+\frac{1}{2}}}E_3\left(x_{i-\frac{1}{2}},y_{j-\frac{1}{2}},z,t\right)\,\mathrm{d}z \\
&\quad+\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}E_2\left(x_{i-\frac{1}{2}},y,z_{k+\frac{1}{2}},t\right)\,\mathrm{d}y-\int_{y_{j-\frac{1}{2}}}^{y_{j+\frac{1}{2}}}E_2\left(x_{i-\frac{1}{2}},y,z_{k-\frac{1}{2}},t\right)\,\mathrm{d}y. \tag*{(37)}
\end{aligned} d t d ∫ S i − 2 1 , j , k x B ⋅ n x d S = − ∫ S i − 2 1 , j , k x ( ∇ × E ) ⋅ n x d S = − ∫ y j − 2 1 y j + 2 1 ∫ z k − 2 1 z k + 2 1 ( ∂ y E 3 − ∂ z E 2 ) d z d y = − ∫ z k − 2 1 z k + 2 1 E 3 ( x i − 2 1 , y j + 2 1 , z , t ) d z + ∫ z k − 2 1 z k + 2 1 E 3 ( x i − 2 1 , y j − 2 1 , z , t ) d z + ∫ y j − 2 1 y j + 2 1 E 2 ( x i − 2 1 , y , z k + 2 1 , t ) d y − ∫ y j − 2 1 y j + 2 1 E 2 ( x i − 2 1 , y , z k − 2 1 , t ) d y . (37)
Integrating (37) in time over a time-step [ t n , t n + 1 ] [t_n,t_{n+1}] [ t n , t n + 1 ] and dividing by the corresponding area Δ y Δ z \Delta y\Delta z Δ y Δ z of the face gives the update formula for the facial average B 0 x , − B_{0}^{x,-} B 0 x , −
B 0 x , − , n + 1 = B 0 x , − , n − 1 Δ y Δ z ∫ t n t n + 1 ( C i − 1 2 , j + 1 2 3 ( t ) − C i − 1 2 , j − 1 2 3 ( t ) − C i − 1 2 , k + 1 2 2 ( t ) + C i − 1 2 , k − 1 2 2 ( t ) ) d t . (38) B_{0}^{x,-,n+1}=B_{0}^{x,-,n}-\frac{1}{\Delta y\Delta z}\int_{t_n}^{t_{n+1}}\left(C_{i-\frac{1}{2},j+\frac{1}{2}}^{3}(t)-C_{i-\frac{1}{2},j-\frac{1}{2}}^{3}(t)-C_{i-\frac{1}{2},k+\frac{1}{2}}^{2}(t)+C_{i-\frac{1}{2},k-\frac{1}{2}}^{2}(t)\right)\,\mathrm{d}t. \tag*{(38)} B 0 x , − , n + 1 = B 0 x , − , n − Δ y Δ z 1 ∫ t n t n + 1 ( C i − 2 1 , j + 2 1 3 ( t ) − C i − 2 1 , j − 2 1 3 ( t ) − C i − 2 1 , k + 2 1 2 ( t ) + C i − 2 1 , k − 2 1 2 ( t ) ) d t . (38)
So the update of the facial averages is given by the circulation of the electric field along the boundary of the face. With
C j − 1 2 , k − 1 2 1 ( t ) : = ∫ x i − 1 2 x i + 1 2 E 1 ( x , y j − 1 2 , z k − 1 2 , t ) d x (39) C_{j-\frac{1}{2},k-\frac{1}{2}}^{1}(t):=\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}}E_1\left(x,y_{j-\frac{1}{2}},z_{k-\frac{1}{2}},t\right)\,\mathrm{d}x \tag*{(39)} C j − 2 1 , k − 2 1 1 ( t ) := ∫ x i − 2 1 x i + 2 1 E 1 ( x , y j − 2 1 , z k − 2 1 , t ) d x (39)
the remaining formulae for the facial averages B 0 y , − , n + 1 B_0^{y,-,n+1} B 0 y , − , n + 1 and B 0 z , − , n + 1 B_0^{z,-,n+1} B 0 z , − , n + 1 are given by
B 0 y , − , n + 1 = B 0 y , − , n − 1 Δ x Δ z ∫ t n t n + 1 ( C j − 1 2 , k + 1 2 1 ( t ) − C j − 1 2 , k − 1 2 1 ( t ) − C i + 1 2 , j − 1 2 3 ( t ) + C i − 1 2 , j − 1 2 3 ( t ) ) d t , B 0 z , − , n + 1 = B 0 z , − , n − 1 Δ x Δ y ∫ t n t n + 1 ( C i + 1 2 , k − 1 2 2 ( t ) − C i − 1 2 , k − 1 2 2 ( t ) − C j + 1 2 , k − 1 2 1 ( t ) + C j − 1 2 , k − 1 2 1 ( t ) ) d t . (40) \begin{aligned}
B_0^{y,-,n+1} &= B_0^{y,-,n} - \frac{1}{\Delta x\Delta z}\int_{t_n}^{t^{n+1}}\left(C_{j-\frac{1}{2},k+\frac{1}{2}}^1(t)-C_{j-\frac{1}{2},k-\frac{1}{2}}^1(t)\right.\\
&\qquad\left.-C_{i+\frac{1}{2},j-\frac{1}{2}}^3(t)+C_{i-\frac{1}{2},j-\frac{1}{2}}^3(t)\right)\,\mathrm{d}t,\\
B_0^{z,-,n+1} &= B_0^{z,-,n} - \frac{1}{\Delta x\Delta y}\int_{t_n}^{t^{n+1}}\left(C_{i+\frac{1}{2},k-\frac{1}{2}}^2(t)-C_{i-\frac{1}{2},k-\frac{1}{2}}^2(t)\right.\\
&\qquad\left.-C_{j+\frac{1}{2},k-\frac{1}{2}}^1(t)+C_{j-\frac{1}{2},k-\frac{1}{2}}^1(t)\right)\,\mathrm{d}t. \tag*{(40)}
\end{aligned} B 0 y , − , n + 1 B 0 z , − , n + 1 = B 0 y , − , n − Δ x Δ z 1 ∫ t n t n + 1 ( C j − 2 1 , k + 2 1 1 ( t ) − C j − 2 1 , k − 2 1 1 ( t ) − C i + 2 1 , j − 2 1 3 ( t ) + C i − 2 1 , j − 2 1 3 ( t ) ) d t , = B 0 z , − , n − Δ x Δ y 1 ∫ t n t n + 1 ( C i + 2 1 , k − 2 1 2 ( t ) − C i − 2 1 , k − 2 1 2 ( t ) − C j + 2 1 , k − 2 1 1 ( t ) + C j − 2 1 , k − 2 1 1 ( t ) ) d t . (40)
In order to maintain third-order accuracy, we approximate the line integrals in space with Simpson’s rule. For this we use point values on the edges of the faces.
C j − 1 2 , k − 1 2 1 ( t ) ≈ Δ x 6 ( E 1 ( x i − 1 2 , y j − 1 2 , z k − 1 2 , t ) + 4 E 1 ( x i , y j − 1 2 , z k − 1 2 , t ) + E 1 ( x i + 1 2 , y j − 1 2 , z k − 1 2 , t ) ) . (41) C_{j-\frac{1}{2},k-\frac{1}{2}}^1(t) \approx\frac{\Delta x}{6}\left(E_1(x_{i-\frac{1}{2}},y_{j-\frac{1}{2}},z_{k-\frac{1}{2}},t)+4E_1(x_i,y_{j-\frac{1}{2}},z_{k-\frac{1}{2}},t)+E_1(x_{i+\frac{1}{2}},y_{j-\frac{1}{2}},z_{k-\frac{1}{2}},t)\right). \tag*{(41)} C j − 2 1 , k − 2 1 1 ( t ) ≈ 6 Δ x ( E 1 ( x i − 2 1 , y j − 2 1 , z k − 2 1 , t ) + 4 E 1 ( x i , y j − 2 1 , z k − 2 1 , t ) + E 1 ( x i + 2 1 , y j − 2 1 , z k − 2 1 , t ) ) . (41)
The time integration in (38) uses the quadrature rule described in § 6.5 . The respective point values on the edges are updated by the evolution operator (26) and (27) with distributional curl (43) at the stages of the time quadrature. These updates (38) , (40) give a divergence-free evolution of the facial averages of B B B in the sense that if (36) is satisfied at time t n t_n t n , it is also satisfied at time t n + 1 t_{n+1} t n + 1 . Essentially, this update is a discrete version of ∇ ⋅ ( ∇ × E ) = 0 \nabla\cdot(\nabla\times E) = 0 ∇ ⋅ ( ∇ × E ) = 0 , which is applied in many structure-preserving methods both for MHD [36 , 37 , 47 ] and Maxwell’s equations [29 , 30 , 39 ] .
In our setting of considering Maxwell’s equations in vacuum, we treat the electric field in the same way as the magnetic field, and the facial averages of E E E can be updated in the same way, leading to ∇ ⋅ E = 0 \nabla\cdot E = 0 ∇ ⋅ E = 0 .
Evolution of point values
We intend to update the point values used in (33) in the same way as in Section 3, i.e. as described in (26) , (27) . However, this approach is not directly applicable to the reconstruction in this section. The reconstruction of Section 3 is globally continuous. Thus, computing the spherical mean of the curl of B B B and E E E is defined in the classical sense. The reconstruction (34) is not continuous across grid cell interfaces. This has the consequence, that the derivative across grid cell interfaces is not defined in the classical sense. Therefore, we instead consider the distributional derivative over discontinuities normal to the derivative. For the spherical mean of the field variables as well as the derivative w.r.t. the radius R R R in (26) and (27) this is not needed. For a function f f f the distributional derivative in x x x -direction across a discontinuity at x i − 1 2 x_{i-\frac{1}{2}} x i − 2 1 that separates two cells is given by [48 Chapter 5]
∂ x f = ( ∂ x f ) c e l l + [ f ] δ ( x − x i − 1 2 ) . (42) \partial_x f = (\partial_x f)_{\mathrm{cell}} + [f]\delta(x-x_{i-\frac{1}{2}}). \tag*{(42)} ∂ x f = ( ∂ x f ) cell + [ f ] δ ( x − x i − 2 1 ) . (42)
Here [ f ] = f + − f − [f] = f^{+} - f^{-} [ f ] = f + − f − denotes the jump at the discontinuity at x i − 1 2 x_{i-\frac{1}{2}} x i − 2 1 and ( ∂ x f ) c e l l (\partial_x f)_{\mathrm{cell}} ( ∂ x f ) cell the classical derivative within the cells left and right of the discontinuity. As an example, we consider the update of E 3 E_3 E 3 at the point value located at ( x i − 1 2 , y , z ) (x_{i-\frac{1}{2}},y,z) ( x i − 2 1 , y , z ) . One of the parts of the integrated curl in (27) is given by the spherical mean of ∂ x B 2 \partial_x B_2 ∂ x B 2 . For ∂ x B 2 \partial_x B_2 ∂ x B 2 we have
M { ∂ x B 2 n , ( x i − 1 2 , y , z ) ; R } = M { ( ∂ x B 2 n ) c e l l , ( x i − 1 2 , y , z ) ; R } + M { [ B 2 n ] δ ( x − x i − 1 2 ) , ( x i − 1 2 , y , z ) ; R } . M\{\partial_x B_2^n,(x_{i-\frac{1}{2}},y,z);R\}=M\{(\partial_x B_2^n)_{\mathrm{cell}},(x_{i-\frac{1}{2}},y,z);R\}
+M\{[B_2^n]\delta(x-x_{i-\frac{1}{2}}),(x_{i-\frac{1}{2}},y,z);R\}. M { ∂ x B 2 n , ( x i − 2 1 , y , z ) ; R } = M {( ∂ x B 2 n ) cell , ( x i − 2 1 , y , z ) ; R } + M {[ B 2 n ] δ ( x − x i − 2 1 ) , ( x i − 2 1 , y , z ) ; R } .
For the latter part we obtain
M { [ B 2 n ] δ ( x − x i − 1 2 ) , ( x i − 1 2 , y , z ) ; R } = 1 4 π ∫ 0 π ∫ 0 2 π [ B 2 n ] ( x i − 1 2 + R sin ( ϕ ) cos ( θ ) , y + R sin ( ϕ ) sin ( θ ) , z + R cos ( ϕ ) ) δ ( R sin ( ϕ ) cos ( θ ) ) sin ( ϕ ) d θ d ϕ . (43) \begin{aligned}
M\{[B_2^n]\delta(x-x_{i-\frac{1}{2}}),(x_{i-\frac{1}{2}},y,z);R\}
={}&\frac{1}{4\pi}\int_0^\pi\int_0^{2\pi}[B_2^n](x_{i-\frac{1}{2}}+R\sin(\phi)\cos(\theta),y+R\sin(\phi)\sin(\theta),\\
&z+R\cos(\phi))\delta(R\sin(\phi)\cos(\theta))\sin(\phi)\,\mathrm{d}\theta\,\mathrm{d}\phi. \tag*{(43)}
\end{aligned} M {[ B 2 n ] δ ( x − x i − 2 1 ) , ( x i − 2 1 , y , z ) ; R } = 4 π 1 ∫ 0 π ∫ 0 2 π [ B 2 n ] ( x i − 2 1 + R sin ( ϕ ) cos ( θ ) , y + R sin ( ϕ ) sin ( θ ) , z + R cos ( ϕ )) δ ( R sin ( ϕ ) cos ( θ )) sin ( ϕ ) d θ d ϕ . (43)
For fixed ϕ \phi ϕ we get a contribution from the distribution at θ = π 2 \theta=\frac{\pi}{2} θ = 2 π and θ = 3 π 2 \theta=\frac{3\pi}{2} θ = 2 3 π . With sin ( ϕ ) ≠ 0 \sin(\phi)\ne0 sin ( ϕ ) = 0 for ϕ ∈ ( 0 , π ) \phi\in(0,\pi) ϕ ∈ ( 0 , π ) , we have
δ ( R sin ( ϕ ) cos ( θ ) ) = 1 R sin ( ϕ ) ( δ ( θ − π 2 ) + δ ( θ − 3 π 2 ) ) . \delta(R\sin(\phi)\cos(\theta))=\frac{1}{R\sin(\phi)}\left(\delta\left(\theta-\frac{\pi}{2}\right)+\delta\left(\theta-\frac{3\pi}{2}\right)\right). δ ( R sin ( ϕ ) cos ( θ )) = R sin ( ϕ ) 1 ( δ ( θ − 2 π ) + δ ( θ − 2 3 π ) ) .
This gives in (43)
1 4 π R ∫ 0 π ( [ B 2 n ] ( x i − 1 2 , y + R sin ( ϕ ) , z + R cos ( ϕ ) ) + [ B 2 n ] ( x i − 1 2 , y − R sin ( ϕ ) , z + R cos ( ϕ ) ) ) d ϕ = 1 4 π R ∫ 0 2 π ( [ B 2 n ] ( x i − 1 2 , y + R sin ( ϕ ) , z + R cos ( ϕ ) ) ) d ϕ = 1 4 π R ∫ 0 2 π ( B 2 n , + ( x i − 1 2 , y + R sin ( ϕ ) , z + R cos ( ϕ ) ) − B 2 n , − ( x i − 1 2 , y + R sin ( ϕ ) , z + R cos ( ϕ ) ) ) d ϕ . (44) \begin{aligned}
\frac{1}{4\pi R}\int_0^\pi\Big(&[B_2^n](x_{i-\frac{1}{2}},y+R\sin(\phi),z+R\cos(\phi))\\
&+[B_2^n](x_{i-\frac{1}{2}},y-R\sin(\phi),z+R\cos(\phi))\Big)\,\mathrm{d}\phi
={}&\frac{1}{4\pi R}\int_0^{2\pi}\Big([B_2^n](x_{i-\frac{1}{2}},y+R\sin(\phi),z+R\cos(\phi))\Big)\,\mathrm{d}\phi\\
={}&\frac{1}{4\pi R}\int_0^{2\pi}\Big(B_2^{n,+}(x_{i-\frac{1}{2}},y+R\sin(\phi),z+R\cos(\phi))\\
&-B_2^{n,-}(x_{i-\frac{1}{2}},y+R\sin(\phi),z+R\cos(\phi))\Big)\,\mathrm{d}\phi. \tag*{(44)}
\end{aligned} 4 π R 1 ∫ 0 π ( = [ B 2 n ] ( x i − 2 1 , y + R sin ( ϕ ) , z + R cos ( ϕ )) + [ B 2 n ] ( x i − 2 1 , y − R sin ( ϕ ) , z + R cos ( ϕ )) ) d ϕ = 4 π R 1 ∫ 0 2 π ( B 2 n , + ( x i − 2 1 , y + R sin ( ϕ ) , z + R cos ( ϕ )) − B 2 n , − ( x i − 2 1 , y + R sin ( ϕ ) , z + R cos ( ϕ )) ) d ϕ . 4 π R 1 ∫ 0 2 π ( [ B 2 n ] ( x i − 2 1 , y + R sin ( ϕ ) , z + R cos ( ϕ )) ) d ϕ (44)
The remaining components are computed analogously. For completion, we give the expressions for the spherical mean of the jumps in y y y and z z z direction at discontinuities at y j − 1 2 y_{j-\frac{1}{2}} y j − 2 1 and z k − 1 2 z_{k-\frac{1}{2}} z k − 2 1 , respectively. We have
M { [ B 1 n ] δ ( y − y j − 1 2 ) , ( x , y j − 1 2 , z ) ; R } = 1 4 π R ∫ 0 2 π ( B 1 n , + ( x + R sin ( ϕ ) , y j − 1 2 , z + R cos ( ϕ ) ) (45) \begin{aligned}
M\{[B_1^n]\delta(y-y_{j-\frac{1}{2}}),(x,y_{j-\frac{1}{2}},z);R\}
=\frac{1}{4\pi R}\int_0^{2\pi}\Big(B_1^{n,+}(x+R\sin(\phi),y_{j-\frac{1}{2}},z+R\cos(\phi)) \tag*{(45)}
\end{aligned} M {[ B 1 n ] δ ( y − y j − 2 1 ) , ( x , y j − 2 1 , z ) ; R } = 4 π R 1 ∫ 0 2 π ( B 1 n , + ( x + R sin ( ϕ ) , y j − 2 1 , z + R cos ( ϕ )) (45)
− B 1 n , − ( x + R sin ( ϕ ) , y j − 1 2 , z + R cos ( ϕ ) ) ) d ϕ , - B_1^{n,-}(x+R\sin(\phi),y_{j-\frac{1}{2}},z+R\cos(\phi)))\,\mathrm{d}\phi, − B 1 n , − ( x + R sin ( ϕ ) , y j − 2 1 , z + R cos ( ϕ ))) d ϕ ,
and
M { [ B 2 n ] δ ( z − z k − 1 2 ) , ( x , y , z k − 1 2 ) ; R } = 1 4 π R ∫ 0 2 π ( B 2 n , + ( x + R sin ( ϕ ) , y + R cos ( ϕ ) , z k − 1 2 ) M\{[B_2^n]_\delta(z-z_{k-\frac{1}{2}}),(x,y,z_{k-\frac{1}{2}});R\}
=
\frac{1}{4\pi R}\int_0^{2\pi}
(
B_2^{n,+}(x+R\sin(\phi),y+R\cos(\phi),z_{k-\frac{1}{2}}) M {[ B 2 n ] δ ( z − z k − 2 1 ) , ( x , y , z k − 2 1 ) ; R } = 4 π R 1 ∫ 0 2 π ( B 2 n , + ( x + R sin ( ϕ ) , y + R cos ( ϕ ) , z k − 2 1 )
− B 2 n , − ( x + R sin ( ϕ ) , y + R cos ( ϕ ) , z k − 1 2 ) ) d ϕ . (46) -B_2^{n,-}(x+R\sin(\phi),y+R\cos(\phi),z_{k-\frac{1}{2}})
)\,\mathrm{d}\phi. \tag*{(46)} − B 2 n , − ( x + R sin ( ϕ ) , y + R cos ( ϕ ) , z k − 2 1 )) d ϕ . (46)
We compute these integrals exactly similar to the approach in Section 3 with SymPy beforehand by integrating cell wise reconstructions along arcs of these circles in the respective discontinuity planes. The bound on the radius R R R given in Section 3 is still applied here. Thus, a necessary stability condition is C F L ≤ 1 2 \mathrm{CFL}\leq\frac{1}{2} CFL ≤ 2 1 .
Initialization of the faces
As described above, the divergence of the reconstruction reduces to the Gauss residual (36) . To maintain third-order accuracy, one could initialize the facial averages with Simpson’s rule. However, this does not guarantee the divergence-free condition of this reconstruction. The method then carries this residual for all times, since the update (38) leaves (36) unchanged regardless of the value of the residual. Thus, we initialize the facial averages from vector potentials A 0 \mathbf{A}_0 A 0 and C 0 \mathbf{C}_0 C 0 with B 0 = ∇ × A 0 \mathbf{B}_0=\nabla\times\mathbf{A}_0 B 0 = ∇ × A 0 and E 0 = ∇ × C 0 \mathbf{E}_0=\nabla\times\mathbf{C}_0 E 0 = ∇ × C 0 similar to what is done in constrained transport methods for MHD [49 ] and Maxwell’s equations [38 ] . The face averages of B 0 \mathbf{B}_0 B 0 then become the circulation of A 0 \mathbf{A}_0 A 0 on the boundaries of the respective faces. Analogously for E 0 \mathbf{E}_0 E 0 and C 0 \mathbf{C}_0 C 0 . The integrals are approximated with Simpson’s rule.
The time quadrature
Although we deviated from a classical approach to Active Flux methods for Maxwell’s equations, we still want to formulate a method that uses the point values updated by the evolution operators (26) , (27) and (43) derived above. The quadrature formula in time should satisfy three properties: First, it should be at least third-order accurate to not diminish the overall accuracy of the method. Second, it should not rely on boundary point values at t n t_n t n , since these are not uniquely defined by the applied discontinuous reconstruction. And third, it should use the point values at t n + 1 t_{n+1} t n + 1 in order to give us diagnostics at the end of the time step. We therefore use the two-point right-sided Gauss–Radau rule, referred to as Radau 2 in the following. We have
1 Δ t ∫ t n t n + 1 f ( t ) d t ≈ 3 4 f ( t n + 1 3 Δ t ) + 1 4 f ( t n + 1 ) , (47) \frac{1}{\Delta t}\int_{t_n}^{t_{n+1}}f(t)\,\mathrm{d}t
\approx
\frac{3}{4}f\left(t_n+\frac{1}{3}\Delta t\right)+\frac{1}{4}f(t_{n+1}), \tag*{(47)} Δ t 1 ∫ t n t n + 1 f ( t ) d t ≈ 4 3 f ( t n + 3 1 Δ t ) + 4 1 f ( t n + 1 ) , (47)
with nodes τ 1 = 1 3 \tau_1=\frac{1}{3} τ 1 = 3 1 , τ 2 = 1 \tau_2=1 τ 2 = 1 and weights w 1 = 3 4 w_1=\frac{3}{4} w 1 = 4 3 , w 2 = 1 4 w_2=\frac{1}{4} w 2 = 4 1 . One time step of the method is summarized in Algorithm 2.
Algorithm 2 Divergence-free method.
Reconstruct B r e c B^{\mathrm{rec}} B rec , E r e c E^{\mathrm{rec}} E rec with (34) on every cell.
Evolve the nine point values of every face to the Radau times with R = c τ Δ t R=c\tau\Delta t R = c τ Δ t using the evolution operator (26) and (27) with distributional curl (43) .
Edge integrals: Compute the edge integrals C i ± 1 2 , j ± 1 2 1 C^{1}_{i\pm\frac{1}{2},j\pm\frac{1}{2}} C i ± 2 1 , j ± 2 1 1 , C i ± 1 2 , k ± 1 2 2 C^{2}_{i\pm\frac{1}{2},k\pm\frac{1}{2}} C i ± 2 1 , k ± 2 1 2 , C i ± 1 2 , j ± 1 2 3 C^{3}_{i\pm\frac{1}{2},j\pm\frac{1}{2}} C i ± 2 1 , j ± 2 1 3 with Simpson’s rule, for every step of the Radau rule (47) in time.
Update facial averages by Stokes (38) , (40) on the respective faces.
Update the five remaining facial moments for B B B and E E E by (33) from the evolved face point values to build the reconstruction in the following time step.
Numerical examples
In this section we consider numerical examples for the proposed methods. For brevity we refer to the method of Section 3 as the classical Active Flux method and to the method of § 6 as the divergence-free method . In all examples we set c = 1 c=1 c = 1 .
We measure the errors e i , j , k e_{i,j,k} e i , j , k for the method of Section 3 by comparing the cell averages with cell averages computed with Simpson’s rule from the exact solution, and the method of § 6 by comparing the face-averages with face-averages computed with Simpson’s rule from the exact solution. We consider the norms
∥ e ∥ L 1 = ∑ i , j , k ∣ e i , j , k ∣ Δ x Δ y Δ z , ∥ e ∥ L 2 = ( ∑ i , j , k e i , j , k 2 Δ x Δ y Δ z ) 1 / 2 , \lVert e\rVert_{L^1}=\sum_{i,j,k}|e_{i,j,k}|\Delta x\Delta y\Delta z,\qquad\lVert e\rVert_{L^2}=\left(\sum_{i,j,k}e_{i,j,k}^{2}\Delta x\Delta y\Delta z\right)^{1/2}, ∥ e ∥ L 1 = i , j , k ∑ ∣ e i , j , k ∣Δ x Δ y Δ z , ∥ e ∥ L 2 = i , j , k ∑ e i , j , k 2 Δ x Δ y Δ z 1/2 ,
∥ e ∥ L ∞ = max i , j , k ∣ e i , j , k ∣ . \lVert e\rVert_{L^\infty}=\max_{i,j,k}|e_{i,j,k}|. ∥ e ∥ L ∞ = i , j , k max ∣ e i , j , k ∣.
For the face averages, e i , j , k e_{i,j,k} e i , j , k denotes the error associated with the respective component on the face, e.g. on the x x x -faces for B 1 B_1 B 1 and E 1 E_1 E 1 . The sums run over all of these faces. To compare both methods, we compare the divergence and the total energy. For the method of Section 3, one measures the divergence of the reconstruction in the L 2 L^2 L 2 norm, in this case the result is given by
∥ ∇ ⋅ B ( ⋅ , t n ) ∥ L 2 2 ≈ ∑ i , j , k ∫ C i , j , k ( ∂ x B 1 r e c , n + ∂ y B 2 r e c , n + ∂ z B 3 r e c , n ) 2 d x d y d z . (48) \lVert\nabla\cdot B(\cdot,t_n)\rVert_{L^2}^{2}\approx\sum_{i,j,k}\int_{\mathcal{C}_{i,j,k}}\left(\partial_x B_1^{\mathrm{rec},n}+\partial_y B_2^{\mathrm{rec},n}+\partial_z B_3^{\mathrm{rec},n}\right)^2\,\mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z. \tag*{(48)} ∥ ∇ ⋅ B ( ⋅ , t n ) ∥ L 2 2 ≈ i , j , k ∑ ∫ C i , j , k ( ∂ x B 1 rec , n + ∂ y B 2 rec , n + ∂ z B 3 rec , n ) 2 d x d y d z . (48)
Since the divergence of the reconstruction of the method described in § 6.1 is constant within a cell, the respective quantity reduces to
∥ ∇ ⋅ B ( ⋅ , t n ) ∥ L 2 2 ≈ ∑ i , j , k Δ x Δ y Δ z ( ∂ x B 1 r e c , n + ∂ y B 2 r e c , n + ∂ z B 3 r e c , n ) 2 . (49) \lVert\nabla\cdot B(\cdot,t_n)\rVert_{L^2}^{2}\approx\sum_{i,j,k}\Delta x\Delta y\Delta z\left(\partial_x B_1^{\mathrm{rec},n}+\partial_y B_2^{\mathrm{rec},n}+\partial_z B_3^{\mathrm{rec},n}\right)^2. \tag*{(49)} ∥ ∇ ⋅ B ( ⋅ , t n ) ∥ L 2 2 ≈ i , j , k ∑ Δ x Δ y Δ z ( ∂ x B 1 rec , n + ∂ y B 2 rec , n + ∂ z B 3 rec , n ) 2 . (49)
We also monitor the maximum value of the divergence of each reconstruction. For the divergence-free method from § 6.1 this quantity is constant in each cell and therefore the maximum value is straightforward to compute. For the classical Active Flux method from Section 3, we evaluate the divergence of the cell’s reconstruction at the 26 points on the boundary and its center and take the maximum. Furthermore, we present the numerical results of the total electromagnetic energy given by
E ( t ) = 1 2 ∫ ( ∣ B ∣ 2 + ∣ E ∣ 2 ) d x . (50) \mathcal{E}(t)=\frac{1}{2}\int\left(\lvert\mathbf{B}\rvert^2+\lvert\mathbf{E}\rvert^2\right)\,\mathrm{d}x. \tag*{(50)} E ( t ) = 2 1 ∫ ( ∣ B ∣ 2 + ∣ E ∣ 2 ) d x . (50)
For the method of Section 3 we compute the energy directly from the cell averages, and for the method of § 6 we compute the energy from the average of the reconstruction over the cell. We monitor the relative energy error
E ( t ) − E ( 0 ) E ( 0 ) . (51) \frac{\mathcal{E}(t)-\mathcal{E}(0)}{\mathcal{E}(0)}. \tag*{(51)} E ( 0 ) E ( t ) − E ( 0 ) . (51)
Plane wave
The first example is a plane wave from [39 ] on the domain [ − 1 2 , 1 2 ] 3 \left[-\frac{1}{2},\frac{1}{2}\right]^3 [ − 2 1 , 2 1 ] 3 with periodic boundary conditions. There the authors considered a plane polarized wave. The magnetic field is given by the vector potential
A = 1 2 π sin ( 2 π ( x + y − 2 t ) ) ( 0 1 0 ) , (52) \mathbf{A}=\frac{1}{2\pi}\sin\left(2\pi\left(x+y-\sqrt{2}t\right)\right)\begin{pmatrix}0\\1\\0\end{pmatrix}, \tag*{(52)} A = 2 π 1 sin ( 2 π ( x + y − 2 t ) ) 0 1 0 , (52)
and the electric field is given by the vector potential
C = − 1 2 2 π sin ( 2 π ( x + y − 2 t ) ) ( 0 0 1 ) . (53) \mathbf{C}=-\frac{1}{2\sqrt{2\pi}}\sin\left(2\pi\left(x+y-\sqrt{2}t\right)\right)\begin{pmatrix}0\\0\\1\end{pmatrix}. \tag*{(53)} C = − 2 2 π 1 sin ( 2 π ( x + y − 2 t ) ) 0 0 1 . (53)
These give the magnetic and electric fields
B = ∇ × A = cos ( 2 π ( x + y − 2 t ) ) ( 0 0 1 ) , \mathbf{B}=\nabla\times\mathbf{A}=\cos\left(2\pi\left(x+y-\sqrt{2}t\right)\right)\begin{pmatrix}0\\0\\1\end{pmatrix}, B = ∇ × A = cos ( 2 π ( x + y − 2 t ) ) 0 0 1 ,
E = ∇ × C = 1 2 cos ( 2 π ( x + y − 2 t ) ) ( − 1 1 0 ) . (54) \mathbf{E}=\nabla\times\mathbf{C}=\frac{1}{\sqrt{2}}\cos\left(2\pi\left(x+y-\sqrt{2}t\right)\right)\begin{pmatrix}-1\\1\\0\end{pmatrix}. \tag*{(54)} E = ∇ × C = 2 1 cos ( 2 π ( x + y − 2 t ) ) − 1 1 0 . (54)
For this example, the Simpson initialization of the face average gives a vanishing Gauss residual. In Table 1 and Table 2 we present the errors of both methods over one period, i.e., until t = 1 2 ≈ 0.707 t=\frac{1}{\sqrt{2}}\approx0.707 t = 2 1 ≈ 0.707 .
Table 1. Errors and experimental orders of convergence for the classical Active Flux method of Section 3 on the plane wave of § 7.1 at t = 1 2 t = \frac{1}{\sqrt{2}} t = 2 1 and CFL = 0.45 = 0.45 = 0.45 .
Table 2. Errors of the face averages and experimental orders of convergence for the divergence-free method of § 6 on the plane wave of § 7.1 at t = 1 2 t = \frac{1}{\sqrt{2}} t = 2 1 and CFL = 0.45 = 0.45 = 0.45 .
One can see that both methods are of third order in all considered norms. For the magnetic field we see that both methods perform better than the third-order DGTD method of [39 ] . We do not compare the errors of the electric field, since [39 ] reports the electric displacement D \mathbf{D} D in SI units, with errors computed at the cell faces. On all considered grids, the error observed for the method from § 6 is roughly twice as large as the error observed for the method from Section 3.
Stability and long-time behavior
Next, we want to investigate the stability and long-time behavior of both methods. For this, we consider an extension of the previous example. The solution is given by
E ( x , t ) = 1 2 cos ( π ( x + y + z − 3 t ) ) ( 1 − 1 0 ) , (55) \mathbf{E}(x,t) = \frac{1}{\sqrt{2}}\cos\left(\pi(x+y+z-\sqrt{3}t)\right)\begin{pmatrix}1\\-1\\0\end{pmatrix}, \tag*{(55)} E ( x , t ) = 2 1 cos ( π ( x + y + z − 3 t ) ) 1 − 1 0 , (55)
B ( x , t ) = 1 6 cos ( π ( x + y + z − 3 t ) ) ( 1 1 − 2 ) . \mathbf{B}(x,t) = \frac{1}{\sqrt{6}}\cos\left(\pi(x+y+z-\sqrt{3}t)\right)\begin{pmatrix}1\\1\\-2\end{pmatrix}. B ( x , t ) = 6 1 cos ( π ( x + y + z − 3 t ) ) 1 1 − 2 .
Here we do not need an initialization of the facial averages from the potential, because for this wave Simpson’s rule is enough to guarantee that the discrete Gauss’ law is satisfied. We consider the domain [ − 1 , 1 ] 3 [-1,1]^3 [ − 1 , 1 ] 3 and periodic boundary conditions. We are first interested in investigating the stability. To monitor the behavior of the methods, we consider the approximation of E 3 E_3 E 3 . A stable method should keep the maximum of that component small. We found that the presented divergence-free method does not reach the same stability as the classical method. In Figure 2 we present the maximum of ∣ E 3 ∣ |E_3| ∣ E 3 ∣ of the cell averages for the classical method and the face averages for the divergence-free method over 10000 time steps for CFL numbers from 0.45 to 0.5. One can see that the classical method is stable for all CFL numbers considered. Its error grows only slowly and stays at about 10 − 10 10^{-10} 1 0 − 10 . The divergence-free method appears to be stable up to a CFL number of 0.48 in this example, while the error grows exponentially for CFL 0.49 and 0.5.
Figure 2. Maximum of ∣ E 3 ∣ |E_3| ∣ E 3 ∣ of the cell averages for the classical (left) and the face averages for the divergence-free method (right) over 10000 time steps for the example (55) on a 32 3 32^3 3 2 3 grid, for the divergence-free method for CFL numbers from 0.45 to 0.5.
We also considered the long-time behavior of the proposed methods and investigated the preservation of the divergence and the total energy for the initial data above. In Figure 3 we present the maximum and the L 2 L^2 L 2 norm of the divergence of both methods and in Figure 4 we present the relative energy (51) for both methods. The divergence of E \mathbf{E} E behaves in the same way and is not shown. The classical Active Flux method keeps its divergence at the level set by the initial data. The divergence-free method holds its divergence at round-off over the whole run. However, it loses more energy than the classical method.
Figure 3. Maximum and L 2 L^2 L 2 norm of ∇ ⋅ B \nabla\cdot B ∇ ⋅ B over 10000 time steps, N 3 = 32 3 N^3 = 32^3 N 3 = 3 2 3 , with CFL = 0.45 for both methods.
Figure 4. Relative energy error for grid with N 3 = 32 3 N^3 = 32^3 N 3 = 3 2 3 cells and CFL = 0.45 for both methods. Left: t ∈ [ 0 , 30 ] t \in[0, 30] t ∈ [ 0 , 30 ] , right: over all 10000 time steps, i.e. t ∈ [ 0 , 281.25 ] t \in[0, 281.25] t ∈ [ 0 , 281.25 ] .
Oblique wave
Another example to investigate both methods is the following oblique wave with wave vector k = π ( 1 , 2 , 2 ) T \boldsymbol{k} = \pi(1,2,2)^T k = π ( 1 , 2 , 2 ) T
E ( x , t ) = 1 5 cos ( π ( x + 2 y + 2 z − 3 t ) ) ( 2 − 1 0 ) , (56) \mathbf{E}(x,t) = \frac{1}{\sqrt{5}}\cos\left(\pi(x+2y+2z-3t)\right)\begin{pmatrix} 2 \\ -1 \\ 0 \end{pmatrix}, \tag*{(56)} E ( x , t ) = 5 1 cos ( π ( x + 2 y + 2 z − 3 t ) ) 2 − 1 0 , (56)
B ( x , t ) = 1 3 5 cos ( π ( x + 2 y + 2 z − 3 t ) ) ( 2 4 − 5 ) . B(x,t) = \frac{1}{3\sqrt{5}} \cos\left(\pi(x+2y+2z-3t)\right)
\begin{pmatrix} 2 \\ 4 \\ -5 \end{pmatrix}. B ( x , t ) = 3 5 1 cos ( π ( x + 2 y + 2 z − 3 t ) ) 2 4 − 5 .
We again consider the domain [ − 1 , 1 ] 3 [-1,1]^3 [ − 1 , 1 ] 3 with periodic boundary conditions. For the initialization of the facial averages we use the following vector potentials
A 0 ( x ) = 1 3 5 π sin ( π ( x + 2 y + 2 z ) ) ( 2 − 1 0 ) , (57) A_0(x) = \frac{1}{3\sqrt{5}\pi}\sin\left(\pi(x+2y+2z)\right)
\begin{pmatrix} 2 \\ -1 \\ 0 \end{pmatrix}, \tag*{(57)} A 0 ( x ) = 3 5 π 1 sin ( π ( x + 2 y + 2 z ) ) 2 − 1 0 , (57)
C 0 ( x ) = − 1 9 5 π sin ( π ( x + 2 y + 2 z ) ) ( 2 4 − 5 ) , C_0(x) = -\frac{1}{9\sqrt{5}\pi}\sin\left(\pi(x+2y+2z)\right)
\begin{pmatrix} 2 \\ 4 \\ -5 \end{pmatrix}, C 0 ( x ) = − 9 5 π 1 sin ( π ( x + 2 y + 2 z ) ) 2 4 − 5 ,
so that ∇ × A 0 = B ( x , 0 ) \nabla\times A_0 = B(x,0) ∇ × A 0 = B ( x , 0 ) and ∇ × C 0 = E ( x , 0 ) \nabla\times C_0 = E(x,0) ∇ × C 0 = E ( x , 0 ) . In the tables below we present the order of convergence for both methods and for their respective divergences as well as the relative energy error (51) at t = 1 t = 1 t = 1 . For all computations we consider a CFL number of 0.45 for the classical Active Flux method and the divergence-free method. In Table 3 and Table 4 we present the accuracy of the classical Active Flux method and the divergence-free method for the oblique wave (56) at t = 1 t = 1 t = 1 . Both methods confirm third-order accuracy in all components. The observed errors are again about twice as large for the method from § 6 . An exception is E 3 E_3 E 3 , which vanishes in the exact solution. For this component the error of the divergence-free method is smaller. In Table 5 and Table 6 we distinguish between the classical method, the divergence-free method with Simpson’s initialization of the facial averages and the divergence-free method with initialization from the vector potentials. We see that the divergence of the classical method converges with second order and the divergence-free method with Simpson’s initialization converges with fourth order. The reason for these discrepancies is that the divergence of the classical method is computed from the derivative of the reconstruction and thus loses one order of accuracy. The divergence-free method shows this behavior because the faces are initialized with Simpson’s rule, which is a fourth-order method. This order gets carried over throughout the method. In Figure 5 we present plots of the divergence and the relative energy error for three configurations. It can be seen that the divergence remains bounded for all methods. For the classical method, it settles slightly above its initial level after a few time steps. For the divergence-free method with Simpson initialisation, it remains at the level set by the initialisation. With initialisation from the vector potentials, it rises during the first few time steps to approximately 10 − 13 10^{-13} 1 0 − 13 in the maximum norm and thus remains at round-off. For this example the divergence-free method needs the initialization from the vector potentials to keep the divergence at round-off. The energy dissipates for all methods, but the classical Active Flux method dissipates less energy than the divergence-free method. The dissipation of the divergence-free method is independent of the initialization of the facial averages.
Table 3. Errors and experimental orders of convergence for the method of Section 3 on the oblique plane wave (56) at t = 1 t = 1 t = 1 and CFL = 0.45.
Table 4. Table 4 Errors of the face averages and experimental orders of convergence for the divergence-free method of § 6 with initialization from the vector potentials on the oblique plane wave (56) at t = 1 t = 1 t = 1 and CFL = 0.45.
Table 5. Table 5 Divergence max ∣ ∇ ⋅ B ∣ \lvert\nabla\cdot B \rvert ∣ ∇ ⋅ B ∣ of the reconstruction at t = 1 t = 1 t = 1 , with CFL = 0.45 for all methods.
Table 6. Absolute value of the relative energy error (51) at t = 1 t = 1 t = 1 , with CFL = 0.45 = 0.45 = 0.45 for all methods.
(a) Classical Active Flux method of Section 3.
(b) Divergence-free method of § 6 with face averages initialized by Simpson’s rule.
(c) Divergence-free method of § 6 with face averages initialized from the potential.
Figure 5. Divergence of B \mathbf{B} B and E \mathbf{E} E in the L ∞ L^\infty L ∞ and L 2 L^2 L 2 norm (left) and relative energy error (51) (right) over t ∈ [ 0 , 1 ] t \in[0,1] t ∈ [ 0 , 1 ] for the oblique plane wave (56) with N 3 = 64 3 N^3 = 64^3 N 3 = 6 4 3 cells and CFL = 0.45 for all methods.
Spherical discontinuity
As a last example we want to consider a spherical discontinuity on the domain [ − 1 , 1 ] 3 [-1,1]^3 [ − 1 , 1 ] 3 with periodic boundary conditions. The initial data is given by
B ( x , 0 ) = { 1 R 0 ( − y , x , 0 ) T , r < R 0 , 0 , r ≥ R 0 , E ( x , 0 ) = 0 , (58) B(x,0)=
\begin{cases}
\frac{1}{R_0}(-y,x,0)^{\mathsf{T}}, & r<R_0,\\
0, & r\ge R_0,
\end{cases}
\qquad E(x,0)=0, \tag*{(58)} B ( x , 0 ) = { R 0 1 ( − y , x , 0 ) T , 0 , r < R 0 , r ≥ R 0 , E ( x , 0 ) = 0 , (58)
with r = ∣ x ∣ r=|x| r = ∣ x ∣ and R 0 = 0.5 R_0=0.5 R 0 = 0.5 . We initialize the facial averages of B B B via Stokes’ theorem from the potential
A ( x ) = ( 0 0 A z ( x ) ) , A z ( x ) = − 1 2 R 0 { x 2 + y 2 , r < R 0 , R 0 2 − z 2 , r > R 0 , ∣ z ∣ < R 0 , 0 , ∣ z ∣ ≥ R 0 . (59) A(x)=
\begin{pmatrix}
0\\
0\\
A_z(x)
\end{pmatrix},
\qquad
A_z(x)=-\frac{1}{2R_0}
\begin{cases}
x^2+y^2, & r<R_0,\\
R_0^2-z^2, & r>R_0,\ |z|<R_0,\\
0, & |z|\ge R_0.
\end{cases} \tag*{(59)} A ( x ) = 0 0 A z ( x ) , A z ( x ) = − 2 R 0 1 ⎩ ⎨ ⎧ x 2 + y 2 , R 0 2 − z 2 , 0 , r < R 0 , r > R 0 , ∣ z ∣ < R 0 , ∣ z ∣ ≥ R 0 . (59)
In this example one discontinuity travels inwards and one outwards. The outgoing front reaches the boundary at time t = 0.5 t=0.5 t = 0.5 , meaning that the solution at time t = 1 t=1 t = 1 in Figure 7 and Figure 8 also contains the waves that have re-entered. In Figure 6 we present the divergence and the relative energy error for both methods. For the divergence-free method we again consider the two different initializations of the facial averages. We see that even with the discontinuity the divergence-free method keeps the divergence at round-off if the face averages are initialized from the potential. Again, the Simpson initialization shows larger values, but these are preserved in time.
Figure 6. Maximum norm of ∇ ⋅ B \nabla\cdot B ∇ ⋅ B (left) and relative energy error (51) (right) over t ∈ [ 0 , 1 ] t \in[0, 1] t ∈ [ 0 , 1 ] for example (58) on a grid with 128 3 128^3 12 8 3 cells, for the classical Active Flux method and the divergence-free method with Simpson and potential initialization, with CFL 0.45 for all methods.
Figure 7. E 3 E_3 E 3 in the plane z = 0 z = 0 z = 0 at t = 1 t = 1 t = 1 on a grid with 128 3 128^3 12 8 3 cells and CFL 0.45. Cell averages of the classical Active Flux method (left), cell averages of the reconstruction of the divergence-free method with potential initialization (middle), difference of the two methods (right).
Figure 8. Cut of E 3 E_3 E 3 along the x x x -axis (y = z = 0 y = z = 0 y = z = 0 ) at t = 1 t = 1 t = 1 for N = 32 , 64 , 128 N = 32, 64, 128 N = 32 , 64 , 128 . Left: cell averages of the classical Active Flux method, right: cell averages of the reconstruction of the divergence-free method with potential initialization.
In Figure 7 we present E 3 E_3 E 3 in the plane z = 0 z = 0 z = 0 at t = 1 t = 1 t = 1 for N 3 = 128 3 N^3 = 128^3 N 3 = 12 8 3 cells for the classical and the divergence-free method. Besides that, we present the difference of the two planes. Furthermore, we present in Figure 8 the respective cut at y = 0 y = 0 y = 0 for N = 32 , 64 , 128 N = 32, 64, 128 N = 32 , 64 , 128 for both methods. Both methods present oscillations at the discontinuities, but no method is superior to the other.
Conclusion
In this article we presented the first fully discrete three-dimensional Active Flux method for Maxwell’s equations. We also presented an alternative approach towards an Active Flux method for Maxwell’s equations that is divergence-free by design. Both methods are based on an evolution operator derived from Kirchhoff’s formula. For the divergence-free method, the curl in the evolution operator is evaluated in the distributional sense to account for the discontinuities of the reconstruction across cell faces. In numerical examples, we compared accuracy, divergence preservation and energy error of both methods. Both methods are third-order accurate. The classical method runs stably up to CFL 0.5 and keeps the divergence error bounded. The divergence-free method preserves the divergence to round-off when the face averages are initialized from a vector potential and appears to be stable up to CFL 0.48. Both methods dissipate energy, the classical method less than the divergence-free method; the dissipation of the divergence-free method is independent of the initialization of the face averages. For a spherical discontinuity, both methods show oscillations of comparable size. In future work, we intend to incorporate source terms in order to couple these methods to Active Flux methods for the Vlasov equation.
Full description of the divergence-free reconstruction
With a cyclic permutation of the coefficients a → b a \to b a → b , b → c b \to c b → c , c → a c \to a c → a , x → y x \to y x → y , y → z y \to z y → z , z → x z \to x z → x , ξ → η \xi\to\eta ξ → η , η → ν \eta\to\nu η → ν , ν → ξ \nu\to\xi ν → ξ in (32) and (34) we obtain the face reconstructions of B 2 B_2 B 2 and B 3 B_3 B 3 from the reconstruction of B 1 B_1 B 1 . We have
B 2 ( ξ , − 1 , ν ) = B 0 y , − P 0 ( ξ ) P 0 ( ν ) + B x y , − P 1 ( ξ ) P 0 ( ν ) + B z y , − P 0 ( ξ ) P 1 ( ν ) + B x x y , − P 2 ( ξ ) P 0 ( ν ) + B x z y , − P 1 ( ξ ) P 1 ( ν ) + B z z y , − P 0 ( ξ ) P 2 ( ν ) , B 3 ( ξ , η , − 1 ) = B 0 z , − P 0 ( ξ ) P 0 ( η ) + B x z , − P 1 ( ξ ) P 0 ( η ) + B y z , − P 0 ( ξ ) P 1 ( η ) + B x x z , − P 2 ( ξ ) P 0 ( η ) + B x y z , − P 1 ( ξ ) P 1 ( η ) + B y y z , − P 0 ( ξ ) P 2 ( η ) . \begin{aligned}
B_2(\xi,-1,\nu)={}&B_0^{y,-}P_0(\xi)P_0(\nu)+B_x^{y,-}P_1(\xi)P_0(\nu)+B_z^{y,-}P_0(\xi)P_1(\nu)\\
&+B_{xx}^{y,-}P_2(\xi)P_0(\nu)+B_{xz}^{y,-}P_1(\xi)P_1(\nu)+B_{zz}^{y,-}P_0(\xi)P_2(\nu),\\
B_3(\xi,\eta,-1)={}&B_0^{z,-}P_0(\xi)P_0(\eta)+B_x^{z,-}P_1(\xi)P_0(\eta)+B_y^{z,-}P_0(\xi)P_1(\eta)\\
&+B_{xx}^{z,-}P_2(\xi)P_0(\eta)+B_{xy}^{z,-}P_1(\xi)P_1(\eta)+B_{yy}^{z,-}P_0(\xi)P_2(\eta).
\end{aligned} B 2 ( ξ , − 1 , ν ) = B 3 ( ξ , η , − 1 ) = B 0 y , − P 0 ( ξ ) P 0 ( ν ) + B x y , − P 1 ( ξ ) P 0 ( ν ) + B z y , − P 0 ( ξ ) P 1 ( ν ) + B xx y , − P 2 ( ξ ) P 0 ( ν ) + B x z y , − P 1 ( ξ ) P 1 ( ν ) + B z z y , − P 0 ( ξ ) P 2 ( ν ) , B 0 z , − P 0 ( ξ ) P 0 ( η ) + B x z , − P 1 ( ξ ) P 0 ( η ) + B y z , − P 0 ( ξ ) P 1 ( η ) + B xx z , − P 2 ( ξ ) P 0 ( η ) + B x y z , − P 1 ( ξ ) P 1 ( η ) + B y y z , − P 0 ( ξ ) P 2 ( η ) .
And the respective cell reconstructions are given by
B 2 r e c ( ξ , η , ν ) = b 0 + b x ξ + b y η + b z ν + b x x P 2 ( ξ ) + b y y P 2 ( η ) + b z z P 2 ( ν ) + b x y ξ η + b x z ξ ν + b y z η ν + b x y z ξ η ν + b y z z η P 2 ( ν ) + b x x y P 2 ( ξ ) η + b y y z P 2 ( η ) ν + b x y y ξ P 2 ( η ) + b y y y P 3 ( η ) , B 3 r e c ( ξ , η , ν ) = c 0 + c x ξ + c y η + c z ν + c x x P 2 ( ξ ) + c y y P 2 ( η ) + c z z P 2 ( ν ) + c x y ξ η + c x z ξ ν + c y z η ν + c x y z ξ η ν + c x x z P 2 ( ξ ) ν + c y y z P 2 ( η ) ν + c x z z ξ P 2 ( ν ) + c y z z η P 2 ( ν ) + c z z z P 3 ( ν ) . \begin{aligned}
B_2^{\mathrm{rec}}(\xi,\eta,\nu)={}&b_0+b_x\xi+b_y\eta+b_z\nu+b_{xx}P_2(\xi)+b_{yy}P_2(\eta)+b_{zz}P_2(\nu)\\
&+b_{xy}\xi\eta+b_{xz}\xi\nu+b_{yz}\eta\nu+b_{xyz}\xi\eta\nu\\
&+b_{yzz}\eta P_2(\nu)+b_{xxy}P_2(\xi)\eta+b_{yyz}P_2(\eta)\nu\\
&+b_{xyy}\xi P_2(\eta)+b_{yyy}P_3(\eta),\\
B_3^{\mathrm{rec}}(\xi,\eta,\nu)={}&c_0+c_x\xi+c_y\eta+c_z\nu+c_{xx}P_2(\xi)+c_{yy}P_2(\eta)+c_{zz}P_2(\nu)\\
&+c_{xy}\xi\eta+c_{xz}\xi\nu+c_{yz}\eta\nu+c_{xyz}\xi\eta\nu\\
&+c_{xxz}P_2(\xi)\nu+c_{yyz}P_2(\eta)\nu+c_{xzz}\xi P_2(\nu)\\
&+c_{yzz}\eta P_2(\nu)+c_{zzz}P_3(\nu).
\end{aligned} B 2 rec ( ξ , η , ν ) = B 3 rec ( ξ , η , ν ) = b 0 + b x ξ + b y η + b z ν + b xx P 2 ( ξ ) + b y y P 2 ( η ) + b z z P 2 ( ν ) + b x y ξ η + b x z ξ ν + b y z η ν + b x y z ξ η ν + b y z z η P 2 ( ν ) + b xx y P 2 ( ξ ) η + b y y z P 2 ( η ) ν + b x y y ξ P 2 ( η ) + b y y y P 3 ( η ) , c 0 + c x ξ + c y η + c z ν + c xx P 2 ( ξ ) + c y y P 2 ( η ) + c z z P 2 ( ν ) + c x y ξ η + c x z ξ ν + c y z η ν + c x y z ξ η ν + c xx z P 2 ( ξ ) ν + c y y z P 2 ( η ) ν + c x z z ξ P 2 ( ν ) + c y z z η P 2 ( ν ) + c z z z P 3 ( ν ) .
Coefficients of the divergence-free reconstruction
Here we list the coefficients of the divergence-free reconstruction (34) in terms of the facial degrees of freedom (33) . Those are derived by rescaling the reconstruction of [37 ] onto the cube [ − 1 , 1 ] 3 [-1,1]^3 [ − 1 , 1 ] 3 . The coefficients of B 1 B_1 B 1 are given by:
a 0 = 1 2 ( B 0 x , + + B 0 x , − ) + 1 6 ( B x y , + − B x y , − ) + 1 6 ( B x z , + − B x z , − ) a x = 1 2 ( B 0 x , + − B 0 x , − ) + 1 15 ( B x x y , + − B x x y , − ) + 1 15 ( B x x z , + − B x x z , − ) a y = 1 2 ( B y x , + + B y x , − ) + 1 12 ( B z x , + − B z x , − ) a z = 1 2 ( B z x , + + B z x , − ) + 1 12 ( B x z y , + − B x z y , − ) a x x = − 1 4 ( B x y , + − B x y , − ) − 1 4 ( B x z , + − B x z , − ) a x y = 1 2 ( B y x , + − B y x , − ) a x z = 1 2 ( B z x , + − B z x , − ) a y y = 1 2 ( B y y x , + + B y y x , − ) a x y y = 1 2 ( B y y x , + − B y y x , − ) a z z = 1 2 ( B z z x , + + B z z x , − ) a x z z = 1 2 ( B z z x , + − B z z x , − ) a y z = 1 2 ( B y z x , + + B y z x , − ) a x y z = 1 2 ( B y z x , + − B y z x , − ) a x x x = − 1 6 ( B x x y , + − B x x y , − ) − 1 6 ( B x x z , + − B x x z , − ) a x x y = − 1 8 ( B x y z , + − B x y z , − ) a x x z = − 1 8 ( B x z y , + − B x z y , − ) . \begin{aligned}
a_0 &= \frac{1}{2}\left(B_0^{x,+}+B_0^{x,-}\right)+\frac{1}{6}\left(B_x^{y,+}-B_x^{y,-}\right)+\frac{1}{6}\left(B_x^{z,+}-B_x^{z,-}\right) \\
a_x &= \frac{1}{2}\left(B_0^{x,+}-B_0^{x,-}\right)+\frac{1}{15}\left(B_{xx}^{y,+}-B_{xx}^{y,-}\right)+\frac{1}{15}\left(B_{xx}^{z,+}-B_{xx}^{z,-}\right) \\
a_y &= \frac{1}{2}\left(B_y^{x,+}+B_y^{x,-}\right)+\frac{1}{12}\left(B_z^{x,+}-B_z^{x,-}\right) \\
a_z &= \frac{1}{2}\left(B_z^{x,+}+B_z^{x,-}\right)+\frac{1}{12}\left(B_{xz}^{y,+}-B_{xz}^{y,-}\right) \\
a_{xx} &= -\frac{1}{4}\left(B_x^{y,+}-B_x^{y,-}\right)-\frac{1}{4}\left(B_x^{z,+}-B_x^{z,-}\right) \\
a_{xy} &= \frac{1}{2}\left(B_y^{x,+}-B_y^{x,-}\right) \\
a_{xz} &= \frac{1}{2}\left(B_z^{x,+}-B_z^{x,-}\right) \\
a_{yy} &= \frac{1}{2}\left(B_{yy}^{x,+}+B_{yy}^{x,-}\right) \\
a_{xyy} &= \frac{1}{2}\left(B_{yy}^{x,+}-B_{yy}^{x,-}\right) \\
a_{zz} &= \frac{1}{2}\left(B_{zz}^{x,+}+B_{zz}^{x,-}\right) \\
a_{xzz} &= \frac{1}{2}\left(B_{zz}^{x,+}-B_{zz}^{x,-}\right) \\
a_{yz} &= \frac{1}{2}\left(B_{yz}^{x,+}+B_{yz}^{x,-}\right) \\
a_{xyz} &= \frac{1}{2}\left(B_{yz}^{x,+}-B_{yz}^{x,-}\right) \\
a_{xxx} &= -\frac{1}{6}\left(B_{xx}^{y,+}-B_{xx}^{y,-}\right)-\frac{1}{6}\left(B_{xx}^{z,+}-B_{xx}^{z,-}\right) \\
a_{xxy} &= -\frac{1}{8}\left(B_{xy}^{z,+}-B_{xy}^{z,-}\right) \\
a_{xxz} &= -\frac{1}{8}\left(B_{xz}^{y,+}-B_{xz}^{y,-}\right).
\end{aligned} a 0 a x a y a z a xx a x y a x z a y y a x y y a z z a x z z a y z a x y z a xxx a xx y a xx z = 2 1 ( B 0 x , + + B 0 x , − ) + 6 1 ( B x y , + − B x y , − ) + 6 1 ( B x z , + − B x z , − ) = 2 1 ( B 0 x , + − B 0 x , − ) + 15 1 ( B xx y , + − B xx y , − ) + 15 1 ( B xx z , + − B xx z , − ) = 2 1 ( B y x , + + B y x , − ) + 12 1 ( B z x , + − B z x , − ) = 2 1 ( B z x , + + B z x , − ) + 12 1 ( B x z y , + − B x z y , − ) = − 4 1 ( B x y , + − B x y , − ) − 4 1 ( B x z , + − B x z , − ) = 2 1 ( B y x , + − B y x , − ) = 2 1 ( B z x , + − B z x , − ) = 2 1 ( B y y x , + + B y y x , − ) = 2 1 ( B y y x , + − B y y x , − ) = 2 1 ( B z z x , + + B z z x , − ) = 2 1 ( B z z x , + − B z z x , − ) = 2 1 ( B y z x , + + B y z x , − ) = 2 1 ( B y z x , + − B y z x , − ) = − 6 1 ( B xx y , + − B xx y , − ) − 6 1 ( B xx z , + − B xx z , − ) = − 8 1 ( B x y z , + − B x y z , − ) = − 8 1 ( B x z y , + − B x z y , − ) .
The coefficients of B 2 B_2 B 2 are given by:
b 0 = 1 2 ( B 0 y , + + B 0 y , − ) + 1 6 ( B y x , + − B y x , − ) + 1 6 ( B y z , + − B y z , − ) b y = 1 2 ( B 0 y , + − B 0 y , − ) + 1 15 ( B y y x , + − B y y x , − ) + 1 15 ( B y y z , + − B y y z , − ) \begin{aligned}
b_0 &= \frac{1}{2}\left(B_0^{y,+}+B_0^{y,-}\right)+\frac{1}{6}\left(B_y^{x,+}-B_y^{x,-}\right)+\frac{1}{6}\left(B_y^{z,+}-B_y^{z,-}\right) \\
b_y &= \frac{1}{2}\left(B_0^{y,+}-B_0^{y,-}\right)+\frac{1}{15}\left(B_{yy}^{x,+}-B_{yy}^{x,-}\right)+\frac{1}{15}\left(B_{yy}^{z,+}-B_{yy}^{z,-}\right)
\end{aligned} b 0 b y = 2 1 ( B 0 y , + + B 0 y , − ) + 6 1 ( B y x , + − B y x , − ) + 6 1 ( B y z , + − B y z , − ) = 2 1 ( B 0 y , + − B 0 y , − ) + 15 1 ( B y y x , + − B y y x , − ) + 15 1 ( B y y z , + − B y y z , − )
b z = 1 2 ( B z y , + + B z y , − ) + 1 12 ( B y z x , + − B y z x , − ) b x = 1 2 ( B x y , + + B x y , − ) + 1 12 ( B x y z , + − B x y z , − ) b y y = − 1 4 ( B y z , + − B y z , − ) − 1 4 ( B y x , + − B y x , − ) b y z = 1 2 ( B z y , + − B z y , − ) b x y = 1 2 ( B x y , + − B x y , − ) b z z = 1 2 ( B z z y , + + B z z y , − ) b y z z = 1 2 ( B z z y , + − B z z y , − ) b x x = 1 2 ( B x x y , + + B x x y , − ) b x x y = 1 2 ( B x x y , + − B x x y , − ) b x z = 1 2 ( B x z y , + + B x z y , − ) b x y z = 1 2 ( B x z y , + − B x z y , − ) b y y y = − 1 6 ( B y y z , + − B y y z , − ) − 1 6 ( B y y x , + − B y y x , − ) b y y z = − 1 8 ( B y z x , + − B y z x , − ) b x y y = − 1 8 ( B x y z , + − B x y z , − ) . \begin{aligned}
b_z &= \frac{1}{2}\left(B_z^{y,+}+B_z^{y,-}\right)+\frac{1}{12}\left(B_{yz}^{x,+}-B_{yz}^{x,-}\right)\\
b_x &= \frac{1}{2}\left(B_x^{y,+}+B_x^{y,-}\right)+\frac{1}{12}\left(B_{xy}^{z,+}-B_{xy}^{z,-}\right)\\
b_{yy} &= -\frac{1}{4}\left(B_y^{z,+}-B_y^{z,-}\right)-\frac{1}{4}\left(B_y^{x,+}-B_y^{x,-}\right)\\
b_{yz} &= \frac{1}{2}\left(B_z^{y,+}-B_z^{y,-}\right)\\
b_{xy} &= \frac{1}{2}\left(B_x^{y,+}-B_x^{y,-}\right)\\
b_{zz} &= \frac{1}{2}\left(B_{zz}^{y,+}+B_{zz}^{y,-}\right)\\
b_{yzz} &= \frac{1}{2}\left(B_{zz}^{y,+}-B_{zz}^{y,-}\right)\\
b_{xx} &= \frac{1}{2}\left(B_{xx}^{y,+}+B_{xx}^{y,-}\right)\\
b_{xxy} &= \frac{1}{2}\left(B_{xx}^{y,+}-B_{xx}^{y,-}\right)\\
b_{xz} &= \frac{1}{2}\left(B_{xz}^{y,+}+B_{xz}^{y,-}\right)\\
b_{xyz} &= \frac{1}{2}\left(B_{xz}^{y,+}-B_{xz}^{y,-}\right)\\
b_{yyy} &= -\frac{1}{6}\left(B_{yy}^{z,+}-B_{yy}^{z,-}\right)-\frac{1}{6}\left(B_{yy}^{x,+}-B_{yy}^{x,-}\right)\\
b_{yyz} &= -\frac{1}{8}\left(B_{yz}^{x,+}-B_{yz}^{x,-}\right)\\
b_{xyy} &= -\frac{1}{8}\left(B_{xy}^{z,+}-B_{xy}^{z,-}\right).
\end{aligned} b z b x b y y b y z b x y b z z b y z z b xx b xx y b x z b x y z b y y y b y y z b x y y = 2 1 ( B z y , + + B z y , − ) + 12 1 ( B y z x , + − B y z x , − ) = 2 1 ( B x y , + + B x y , − ) + 12 1 ( B x y z , + − B x y z , − ) = − 4 1 ( B y z , + − B y z , − ) − 4 1 ( B y x , + − B y x , − ) = 2 1 ( B z y , + − B z y , − ) = 2 1 ( B x y , + − B x y , − ) = 2 1 ( B z z y , + + B z z y , − ) = 2 1 ( B z z y , + − B z z y , − ) = 2 1 ( B xx y , + + B xx y , − ) = 2 1 ( B xx y , + − B xx y , − ) = 2 1 ( B x z y , + + B x z y , − ) = 2 1 ( B x z y , + − B x z y , − ) = − 6 1 ( B y y z , + − B y y z , − ) − 6 1 ( B y y x , + − B y y x , − ) = − 8 1 ( B y z x , + − B y z x , − ) = − 8 1 ( B x y z , + − B x y z , − ) .
The coefficients of B 3 B_3 B 3 are given by:
c 0 = 1 2 ( B 0 z , + + B 0 z , − ) + 1 6 ( B z x , + − B z x , − ) + 1 6 ( B z y , + − B z y , − ) c z = 1 2 ( B 0 z , + − B 0 z , − ) + 1 15 ( B x z x , + − B x z x , − ) + 1 15 ( B y z y , + − B y z y , − ) c x = 1 2 ( B x z , + + B x z , − ) + 1 12 ( B x z y , + − B x z y , − ) c y = 1 2 ( B y z , + + B y z , − ) + 1 12 ( B y z x , + − B y z x , − ) c z z = − 1 4 ( B z x , + − B z x , − ) − 1 4 ( B z y , + − B z y , − ) c x z = 1 2 ( B x z , + − B x z , − ) c y z = 1 2 ( B y z , + − B y z , − ) \begin{aligned}
c_0 &= \frac{1}{2}\left(B_0^{z,+}+B_0^{z,-}\right)+\frac{1}{6}\left(B_z^{x,+}-B_z^{x,-}\right)+\frac{1}{6}\left(B_z^{y,+}-B_z^{y,-}\right)\\
c_z &= \frac{1}{2}\left(B_0^{z,+}-B_0^{z,-}\right)+\frac{1}{15}\left(B_{xz}^{x,+}-B_{xz}^{x,-}\right)+\frac{1}{15}\left(B_{yz}^{y,+}-B_{yz}^{y,-}\right)\\
c_x &= \frac{1}{2}\left(B_x^{z,+}+B_x^{z,-}\right)+\frac{1}{12}\left(B_{xz}^{y,+}-B_{xz}^{y,-}\right)\\
c_y &= \frac{1}{2}\left(B_y^{z,+}+B_y^{z,-}\right)+\frac{1}{12}\left(B_{yz}^{x,+}-B_{yz}^{x,-}\right)\\
c_{zz} &= -\frac{1}{4}\left(B_z^{x,+}-B_z^{x,-}\right)-\frac{1}{4}\left(B_z^{y,+}-B_z^{y,-}\right)\\
c_{xz} &= \frac{1}{2}\left(B_x^{z,+}-B_x^{z,-}\right)\\
c_{yz} &= \frac{1}{2}\left(B_y^{z,+}-B_y^{z,-}\right)
\end{aligned} c 0 c z c x c y c z z c x z c y z = 2 1 ( B 0 z , + + B 0 z , − ) + 6 1 ( B z x , + − B z x , − ) + 6 1 ( B z y , + − B z y , − ) = 2 1 ( B 0 z , + − B 0 z , − ) + 15 1 ( B x z x , + − B x z x , − ) + 15 1 ( B y z y , + − B y z y , − ) = 2 1 ( B x z , + + B x z , − ) + 12 1 ( B x z y , + − B x z y , − ) = 2 1 ( B y z , + + B y z , − ) + 12 1 ( B y z x , + − B y z x , − ) = − 4 1 ( B z x , + − B z x , − ) − 4 1 ( B z y , + − B z y , − ) = 2 1 ( B x z , + − B x z , − ) = 2 1 ( B y z , + − B y z , − )
c x x = 1 2 ( B x x z , + + B x x z , − ) c_{xx} = \frac{1}{2}\left(B^{z,+}_{xx} + B^{z,-}_{xx}\right) c xx = 2 1 ( B xx z , + + B xx z , − )
c x x z = 1 2 ( B x x z , + − B x x z , − ) c_{xxz} = \frac{1}{2}\left(B^{z,+}_{xx} - B^{z,-}_{xx}\right) c xx z = 2 1 ( B xx z , + − B xx z , − )
c y y = 1 2 ( B y y z , + + B y y z , − ) c_{yy} = \frac{1}{2}\left(B^{z,+}_{yy} + B^{z,-}_{yy}\right) c y y = 2 1 ( B y y z , + + B y y z , − )
c y y z = 1 2 ( B y y z , + − B y y z , − ) c_{yyz} = \frac{1}{2}\left(B^{z,+}_{yy} - B^{z,-}_{yy}\right) c y y z = 2 1 ( B y y z , + − B y y z , − )
c x y = 1 2 ( B x y z , + + B x y z , − ) c_{xy} = \frac{1}{2}\left(B^{z,+}_{xy} + B^{z,-}_{xy}\right) c x y = 2 1 ( B x y z , + + B x y z , − )
c x y z = 1 2 ( B x y z , + − B x y z , − ) c_{xyz} = \frac{1}{2}\left(B^{z,+}_{xy} - B^{z,-}_{xy}\right) c x y z = 2 1 ( B x y z , + − B x y z , − )
c z z z = − 1 6 ( B z z x , + − B z z x , − ) − 1 6 ( B z z y , + − B z z y , − ) c_{zzz} = -\frac{1}{6}\left(B^{x,+}_{zz} - B^{x,-}_{zz}\right) - \frac{1}{6}\left(B^{y,+}_{zz} - B^{y,-}_{zz}\right) c z z z = − 6 1 ( B z z x , + − B z z x , − ) − 6 1 ( B z z y , + − B z z y , − )
c x z z = − 1 8 ( B x z y , + − B x z y , − ) c_{xzz} = -\frac{1}{8}\left(B^{y,+}_{xz} - B^{y,-}_{xz}\right) c x z z = − 8 1 ( B x z y , + − B x z y , − )
c y z z = − 1 8 ( B y z x , + − B y z x , − ) c_{yzz} = -\frac{1}{8}\left(B^{x,+}_{yz} - B^{x,-}_{yz}\right) c y z z = − 8 1 ( B y z x , + − B y z x , − )