1 Introduction

In this paper we consider the rigorous error analysis of a fully discrete alternating direction implicit (ADI) scheme for a general class of wave-type problems. In particular, we analyze the full discretization obtained by using a method-of-lines approach comprised of the Peaceman–Rachford scheme in time [37] and a central fluxes discontinuous Galerkin (dG) discretization in space [5, 20] in a rather general framework.

Given an initial state \(u^0\) we seek the solution \(u\) of the wave-type problem

figure a

on an open, bounded and connected Lipschitz domain in \(\Omega \subset {\mathbb {R}}^{d}\), \({d} = 2,3,\ldots \), supplemented with suitable boundary conditions. The latter will be incorporated into the domain of the spatial differential operator . In (1), \(M\in {L^{\infty }}(\Omega )^{m\times m}\) is a symmetric and uniformly positive definite material tensor and \({g\in C({\mathbb {R}}_{+};{L^2}(\Omega )^{m})}\) is a source term. The operator is a Friedrichs’ operator [13] given by

where the partial derivatives are to be understood in a distributional sense. The assumption that the coefficients \(L_{0},\ldots ,L_{{d}}\) are constant is posed for the sake of presentation. However, we point out that all results hold true for more general coefficients fulfilling suitable regularity assumption, cf., [29] for details. To obtain a wellposed (and energy-dissipating) problem in this constant coefficient case, it is sufficient to assume that the symmetric part of \(L_{0}\) is negative semi-definite, i.e., \({x}^{\mathrm{T}}({L_{0}}+{{L_{0}}^{\mathrm{T}}})x \le 0\) for all \(x\in {\mathbb {R}}^{m}\), and that the remaining coefficients \(L_{1},\ldots ,L_{{d}}\) are symmetric [5, 23]. Note that it is possible to drop the condition on \(L_{0}\) and still get a wellposed, albeit only shift-dissipative, problem. The class of problems described by (1) comprises, among others, the advection equation, the acoustic or elastic wave equations, and the Maxwell equations, cf., [2, 3, 5, 29].

In this paper, we employ the framework of (abstract) evolution equations. This allows us to study the wellposedness of (1) within the well-understood and extensive theory of linear semigroups [36]. Moreover, one can then formally apply time integration schemes designed for ordinary differential equations, such as Runge-Kutta schemes or the Peaceman–Rachford scheme used here, in a straightforward way. We thus eliminate the material tensor \(M\) in front of the time derivative to obtain

figure b

with and . By this reformulation, inherits the structure of and we thus refer to this operator as a Friedrichs’ operator as well.

We analyze a fully discrete Peaceman–Rachford ADI scheme for the numerical solution of (2). ADI schemes are a class of splitting schemes first proposed for the heat equation discretized by finite differences in [37]. The main idea is to split the spatial differential operator in terms of the spatial directions. Combining this splitting with a suitable time integration method, such as the Peaceman–Rachford scheme, results in an unconditionally stable integrator. The main feat of the resulting scheme is that each timestep can be performed at about the cost of an explicit integrator, which makes it extremely efficient. Roughly speaking, this efficiency is achieved by splitting in such a way that only partial derivatives in one spatial direction occur in each of the split operators, essentially decoupling the one-dimensional flows. Of course, this severely restricts the class of problems to which the method can be applied efficiently. One main restriction is that the problem has to be considered on cuboidal domains (or unions thereof). Further, up until recently, the method was basically restricted to finite difference discretizations of the heat equation or the acoustic wave equation, both in two dimensions, where the appropriate splitting can easily be deduced [37]. There are varieties, where more than two split operators are considered to tackle higher dimensions, see e.g., [15, 27]. However, this results in a scheme that is only conditionally stable, hence losing a very favorable property of ADI schemes.

Rather surprisingly, in [33, 45], a novel ADI splitting into two operators for the full 3D Maxwell equations was proposed for finite differences time domain (FDTD) discretizations on the Yee grid [43]. Consequently, this ADI-FDTD method received a lot of attention and gave rise to several variants. For instance, more efficient implementations can be found in [4, 14, 16, 25] and energy preserving variants in [7, 17, 18], see also the references given in these papers.

Motivated by this new splitting, in [22], the authors of this paper identified a general class of problems of the form (2) and their space discretizations which admit a splitting that leads to an efficient ADI method with only two split operators, while preserving unconditional stability. Since this class only comprised diagonal material tensors, it was extended to more general tensors in [29].

Further, in [41] and the recent review [42], the Peaceman–Rachford and other, related splitting schemes were rewritten into a formulation referred to as fundamental implicit scheme. This reformulation avoids applications of the discrete operators on the right-hand side leading to an even more efficient scheme. One can directly apply these ideas to the scheme considered here and in [22], since it exhibits the exact same structures exploited in [41, 42].

Unfortunately, finite differences in space prevent a rigorous error analysis under realistic regularity assumptions on the approximated solution. Hence, in [22], we combined the Peaceman–Rachford scheme with a dG discretization in space, cf., [5, 20]. We showed that if a tensor-structured grid is used, the fully discrete method exhibits runtime behavior similar to the finite difference version. In particular, one step can be performed in linear complexity w.r.t. the number of elements used in the mesh. Here, we supplement these computational investigations by a rigorous error analysis of the scheme used in [22].

There are already some results on the stability and convergence of the Peaceman–Rachford scheme applied to finite difference space discretizations, cf., e.g., [12, 18, 25, 26, 31, 38]. However, these results rely on strong regularity of the exact solution. So far, we are only aware of one publication that provides rigorous error bounds under realistic regularity assumptions, namely [19]. However, these results seem not to be applicable to the setting we consider here, because they rely on the assumption that norms of some concatenations of the discrete operators are bounded independently of the discretization parameters. To our knowledge, this is not the case here.

Besides full discretization results, there exist several rigorous semidiscrete analyses for the Peaceman–Rachford scheme applied to the Maxwell equations interpreted as an abstract Cauchy problem. In [21], the homogeneous and in [6, 8, 9], the inhomogeneous and damped equations were considered. Further, in [44], a detailed analysis of the abstract Maxwell problem with jumping material parameters was performed, providing error bounds of order 3/2 for suitable data. We point out that all these results pose assumptions only on the data, as opposed to the analysis carried out here, which assumes regularity of the exact solution. However, the regularity analysis carried out in [6, 8, 9, 21] can be used to defer these assumptions to the data in the particular case of Maxwell equations.

The analysis we present here is based on the fact that the Peaceman–Rachford scheme can be interpreted as a perturbation of the Crank–Nicolson scheme. Hence, we were able to extend techniques established in [24, 40]. These techniques were originally developed for a locally implicit time integration scheme but also apply to the full discretization obtained by the Crank–Nicolson and the leapfrog scheme, respectively. In fact, our extension of these techniques can also be applied to other perturbations of the Crank–Nicolson scheme in a straightforward manner.

Further, based on a stronger stability result for abstract evolution equations given in [28], we identify suitable approximations to the first-order derivatives in space and time of the solution of (2). We show that, if the solution is sufficiently regular, these approximations fulfill error bounds of the same order as the approximations to the solution given directly by the scheme. We point out that these results can be generalized in a straightforward way to other schemes that can be analyzed by the techniques from [24, 40]. As far as we are aware of, such results were not given before in the literature. Nevertheless, we would like to mention that related error bounds in a discrete \(H^1\)-norm were achieved for finite difference methods under much stronger regularity assumptions in [16, 17].

In [23], as a preliminary work to the analysis of the full discretization of (2), we analyzed the error of the spatial semi-discretization by a central fluxes dG method [5, 20]. However, in contrast to [23], in this paper, we directly define and formulate all our results in a weighted \({L^2}\)-inner product incorporating the material tensor \(M\) instead of the standard one. This approach appears to be more natural for our analysis. Further, by stating the required polynomial approximation results in this weighted inner product, we could eliminate Assumption 4.2 in [23]. As a consequence, all results now apply to more general material parameters, e.g., piecewise Lipschitz or piecewise smooth instead of piecewise constant ones. Since most proofs in [23] directly generalize to this weighted setting, we do not present them in detail here again.

Lastly, note that our analysis is not restricted to the class of problems which allow for an efficient ADI splitting cf., [22] for details. In fact, these restrictions are only necessary for the efficiency of the method, not for the numerical analysis of the discretization scheme. Hence, our results also hold for more general problems and geometries of the domain, cf., Sect. 4.1.

The paper is organized as follows. After providing some notation, in Sect. 2, we present the analytical framework used for our analysis and show wellposedness of (2). Subsequently, in Sect. 3, we briefly present the spatial discretization employed in our method-of-lines approach. Section 4 starts by providing suitable splittings, which are then used to fully discretize (2) by using the Peaceman–Rachford method in time. In this section we also show unconditional stability of the scheme and identify approximations to the first-order derivatives in space and time of the solution of (2). Then, in Sect. 5, we present our main results, which show rigorous error bounds for both the approximations directly provided by the scheme as well as the aforementioned approximations to the derivatives. We conclude with numerical experiments verifying our theoretical results in Sect. 6.

1.1 Notation

In this section, we introduce the basic notation used throughout the paper.

The distributional partial derivative in ith coordinate direction of \({\mathbb {R}}^d\) is denoted by \(\partial _i\), \(i=1,\ldots ,d\). Given a multi-index \(\alpha =(\alpha _1,\ldots ,\alpha _d)\in {\mathbb {N}}_0^d\) we write \(\partial ^{\alpha }v= \partial _1^{\alpha _1}\ldots \partial _d^{\alpha _d} v\) with the convention \(\partial ^{(0,\ldots ,0)}v=v\). We further denote the \(\ell ^1\)-norm of \(\alpha \in {\mathbb {N}}_0^d\) by \(|\alpha |\). For vectors and matrices these derivatives act componentwise.

Given two real Hilbert spaces \(\big (X,\big (\cdot \,\big |\,\cdot \big )_{X}\big )\) and \(\big (Y,\big (\cdot \,\big |\,\cdot \big )_{Y}\big )\), we denote the set of all bounded operators from X to Y by . The identity operator on a Hilbert space is denoted by . We write the dual space of X as \(X'\) and denote the canonical dual pairing between X and its dual by .

In Sect. 2 we will restrict a Friedrichs’ operator to its domain , which incorporates the boundary conditions in such a way that the restriction becomes maximal dissipative. Then, we define the domain of the concatenation of two Friedrichs’ operators and as and extend this definition recursively to more than two operators.

For the remainder of this section, let \(K\subset {\mathbb {R}}^{{d}}\) be open and \(F \subset \partial K\). The set of polynomials of degree at most \(k\in {\mathbb {N}}\) on K is denoted by \({\mathbb {Q}}_{{d}}^{k}(K)\).

Given two vector-valued functions \(u,v\in {L^2}(K)^m\), we denote the (standard) \({L^2}(K)\)-inner product by

$$\begin{aligned} \big (u\,\big |\,v\big )_{{L^2},K} = \int _{K} u \cdot v \,\text {d }x, \end{aligned}$$

and for \(F \subset \partial K\) and , we denote the surface integral over F as

For the analysis, we also need the following inner product weighted by the material tensor \(M\) given by

$$\begin{aligned} \big (u\,\big |\,v\big )_{K} = \big (Mu\,\big |\,v\big )_{{L^2},K}. \end{aligned}$$

By the properties of \(M\), the weighted and \({L^2}\)-inner product are equivalent and thus, the space \(\big ({L^2}(K)^m,\big (\cdot \,\big |\,\cdot \big )_{K}\big )\) is a Hilbert space. The norms induced by these inner products are denoted by \(\Vert \cdot \Vert _{{L^2},K}\), \(\Vert \cdot \Vert _{K}\) and \(\Vert \cdot \Vert _{F}\), respectively.

The \({L^2}\)-Sobolev spaces on K are denoted by , \(q\in {\mathbb {N}}_0\), and we equip them with the norms

where \(\alpha \in {\mathbb {N}}_0^d\) is a multi-index. Note that we use the weighted \({L^2}\)-norm, not the standard one, to define the Sobolev-norms. However, by equivalence, these spaces can be identified. Further, note that \(q=0\) yields the corresponding (weighted) \({L^2}\)-space.

We denote the spectral norm of a matrix \(A\in {\mathbb {R}}^{m\times m}\) by \(\Vert A\Vert \). Given a square matrix-valued field \(A\in {L^{\infty }}(K)^{m\times m}\), the essential supremum of the spectral norm of A is denoted by

Lastly, by \(W^{q,\infty }(K)\), \(q\in {\mathbb {N}}_0\), we denote the \({L^{\infty }}\)-Sobolev spaces on K and for \(A\in W^{q,\infty }(K)^{m\times m}\), we write

2 Analytical setting

In this section, we briefly present some properties of Friedrichs’ operators and systems of the form (2). We refer to [2, 5, 11, 23] for most of the details.

The graph space of a Friedrichs’ operator is defined as

As a straightforward consequence of [5, Lem. 7.2], the graph space together with the (weighted) graph norm

form a Hilbert space and by definition we have . The notation for the graph space is inspired by \(H({\text {div}})\) and \(H({\text {curl}})\), which are important, since they arise for the wave and Maxwell equations, respectively.

In this weak setting, the meaning of boundary values is not clear. In order to still get hold of them, we need to introduce a more general concept of boundary values. For this, we first need to define the formal adjoint of .

Definition 2.1

We call defined via

the formal adjoint of .

The formal adjoint allows us to define the following boundary operator, which is the aforementioned generalization of boundary values.

Definition 2.2

We call defined by

(3)

the boundary operator associated with .

Basically, (3) is a generalized integration-by-parts formula. Further, note that the boundary operator is symmetric and bounded, i.e., , cf., [11, Lem. 2.2].

Boundary conditions in this framework are implemented by incorporating them into the domain of the operator . To this end, we follow the procedure in [11, Sec. 2.1] and assume the existence of the following abstract boundary operator.

Assumption 2.3

There exists a bounded operator with

(4a)
(4b)

Since the kernel of a bounded operator on a Hilbert space is closed, both and are Hilbert spaces if endowed with the graph norm of .

To show wellposedness of (2), we use semigroup theory. Hence, we define the domain of as . In fact, if restricted to this space, is maximal dissipative [23, Thm. 3.5]. Note that can be seen as the subspace of in which the boundary conditions defined by are incorporated.

As a direct consequence of the maximal dissipativity, the famous Lumer–Phillips Theorem [10, Thm. II.3.15, Cor. II.3.20] implies that the restriction is the generator of a contraction semigroup, which we denote by . This immediately yields the following wellposedness and stability result, see [36] and [28, Lem. 2.4] for the second stability bound.

Corollary 2.4

Let \(f= f_1 + f_2\) with and . Then, for a given initial value , there exists a unique solution of (2) given by the variation-of-constants formula

Further, we have the stability bounds

and

3 Spatial discretization

We use the dG method with central fluxes to discretize the Friedrichs’ operator . The content of this section is a brief presentation of previously established results (mostly from [11, 23, 29]), hence we omit the rather technical and lengthy proofs.

To avoid taking domain approximation into account, in the following, we assume \(\Omega \) to be polyhedral. Given a mesh of \(\Omega \), we denote the diameter of an (open) mesh element or cell by \(h_{{K}}\). The index denotes the maximal diameter of all elements in or meshsize of . To keep the notation of mesh-dependent norms concise and intuitive, we further define the piecewise constant function \(h\in {L^{\infty }}(\Omega )\) by for all .

Since we analyze the approximation error w.r.t. , we consider a sequence of meshes , where is a countable collection of positive numbers with 0 as only accumulation point. To investigate the aforementioned error, we have to ensure a certain quality of the meshes as the meshsize approaches zero and we therefore assume that is admissible in the sense of [5, Def. 1.57]. This means that the mesh sequence is shape and contact regular and has optimal polynomial approximation properties. We denote the regularity parameter of by \(\rho \).

The faces of a mesh are collected in the set , which is decomposed into the set of interior faces or interfaces and the set of boundary faces . Further, for each we introduce the subset of faces that compose the boundary of said element as and denote the maximum number of faces per element by . Note that this number is bounded independently of due to the admissibility of , cf., [5, Lemma 1.41].

We denote the outward unit normal vector to an element by \({\mathfrak {n}^{K}}\). Additionally, we define a face normal vector to each face denoted by \({\mathfrak {n}^{F}}\) in the following way. Given a boundary face , we simply define \({\mathfrak {n}^{F}}\) as the outward unit normal vector to \(\Gamma \). For each interface , we denote the two neighboring elements w.r.t. \({F}\) arbitrarily by \({K}^{{F}}_{1}\) and \({K}^{{F}}_{2}\) and fix this choice. The face normal vector \({\mathfrak {n}^{F}}\) is then defined as the outward unit normal vector to \({K}^{{F}}_{1}\).

Next, we denote the discrete approximation space consisting of broken polynomials of degree at most \(k\) in each variable by

Throughout the rest of the paper, we denote objects contained in or mapping into the discrete space in bold face. In particular, we slightly deviate from the notation introduced in the beginning by denoting the identity on by \(\pmb {{\mathcal {I}}}\).

Remark 3.1

To keep the presentation concise, we consider polynomials of the same degree on each element . Note, however, that the dG method can easily handle different polynomial degrees on different elements and all our results can be generalized to this case in a straightforward manner. Further, there is more freedom in choosing the discrete spaces, e.g., polynomials of total degree at most \(k\). More details on this can be found in [5, Sec. 1.2.4.3].

As a consequence of the admissibility of \({\mathcal {T}}_{{\mathcal {H}}}\), some important properties of the discrete spaces can be inferred. In particular, since admissibility implies shape and contact regularity, the inverse inequality and the discrete trace inequality

$$\begin{aligned} \Vert {{\,\mathrm{\nabla \!}\,}}\pmb {v}\Vert _{{K}} \le C_{\text {inv }}'\Vert h^{-1} \pmb {v}\Vert _{{K}}, \qquad \text {and}\qquad \Vert \pmb {v}\Vert _{{F}} \le C_{\text {tr }}\Vert h^{-1/2} \pmb {v}\Vert _{{K}}, \end{aligned}$$
(5)

respectively, hold for all , [5, Lem. 1.44 & 1.46]. We point out that the result on the elements is originally stated in the standard \({L^2}\)-inner product, not the weighted version used here. However, by equivalence, it also holds in this setting. The inverse inequality (5) further implies a similar inequality for the Friedrichs’ operator instead of the gradient, namely

(6)

where and \(C_{\text {inv }}=\sqrt{{d}}C_{\text {inv }}'+ 1\).

To identify a best approximation in to some \({L^2}\)-function (in some sense), we define the (weighted) \({L^2}\)-projection w.r.t. the weighted inner product \(\big (\cdot \,\big |\,\cdot \big )_{\Omega }\) such that for \(v\in {L^2}(\Omega )^{m}\) we have

The error caused by this projection is then denoted as

$$\begin{aligned} e_{\pi }^{v} = v-\pi _{h}v. \end{aligned}$$
(7)

Since the mesh sequence \({\mathcal {T}}_{{\mathcal {H}}}\) is admissible and hence possesses optimal polynomial approximation properties in the sense of [5, Def. 1.55], we are able to infer bounds that measure the quality of this approximation. However, since we use a weighted \({L^2}\)-projection and the necessary results [5, Lem. 1.58 & 1.59] are given for the standard one, we can not immediately apply them. Still, the next lemma shows that these results also hold in our setting.

Lemma 3.2

For all , , and the projection error \(e_{\pi }^{v}\) satisfies

where and are independent of \({K}\) and .

Proof

To prove this, one shows that, by the properties of \(M\), the projection error \(\pi _{h}\) w.r.t. the weighted inner product yields the same quality of approximation as the standard \({L^2}\)-projection w.r.t. \(\Vert \cdot \Vert _{{L^2},{K}}\). Using the equivalence of the weighted and standard norm then yields the claim. We omit the details. \(\square \)

We aim to approximate functions in space by elements of the discrete approximation space . These discrete functions can be discontinuous along element borders but are polynomials on the elements. Thus, they are apt to approximate functions that are sufficiently smooth on the elements. The broken Sobolev spaces defined by

contain such functions. They are Hilbert spaces if endowed with the norm

Since neither functions contained in the discrete approximation space , nor those contained in the broken Sobolev spaces need to be continuous across the boundaries of mesh elements, their evaluation at these boundaries is not well-defined. Thus, for an interface , we write and for the limit of a function \(v\) approaching \({F}\) from \({K}^{{F}}_{1}\) or \({K}^{{F}}_{2}\), respectively. With this, we define the average and the jump of a function \(v\) across an interior face as

respectively. These values serve as a measure for the discontinuities of the discrete functions and are used to establish coupling between the otherwise decoupled elements in the discrete problem.

Lastly, analogously to the broken Sobolev spaces , we define the spaces

\(q\in {\mathbb {N}}_0\), together with the norm

3.1 Friedrichs’ operators in the discrete setting

To define the discrete operator, it is convenient to have a more concrete representation of boundary values than the abstract boundary operator from Definition 2.2. To achieve this, we restrict ourselves to spaces whose elements admit square-integrable traces – in contrast to those of . In particular, we consider the intersection of and the broken Sobolev space . Then, the abstract boundary operator can be expressed by means of the usual integration-by-parts formula (on each element ). Namely, by [23, Lem. 4.3] for , we have

and, for , Definition 2.2 of hence yields

Note that for all . Further, since we later on work on individual faces, we define the boundary field on each face via

Following the same line of reasoning, it is convenient to also have a representation of the abstract boundary operator in terms of boundary fields. This is achieved by making the following assumption, which is in fact fulfilled in many practical situations. We refer to [11, Sec. 5] for some examples.

Assumption 3.3

The boundary operator is associated with a matrix-valued boundary field such that for \(v,w\) sufficiently smooth we have

Lastly, we give an auxiliary result needed to bound defects occurring in the error analysis of the fully discrete scheme. It can be proven by multiple applications of the product rule applied to and exploiting that is composed of constant coefficients and first-order partial derivatives.

Lemma 3.4

Let \(q \ge 0\), and . Then and for all \(p\in {\mathbb {Z}}\), we have

and, in particular,

where only depends on q, d, , \(\Vert M\Vert _{\infty ,\Omega }\), and .

3.2 Discrete Friedrichs’ operators

We now define the central fluxes dG discretization of . Instead of defining it only on the discrete approximation space , which would be sufficient for formulating the (semi-)discrete problem, we extend its domain of definition to the space . This will prove useful later for the error analysis. Hence, we define the discrete operator domain associated with as

The discrete operator is then defined as follows.

Definition 3.5

The central fluxes dG discretization of is the operator defined as

Note that is well-defined as an easy consequence of the Riesz representation theorem, cf., [23, Sec. 4.3].

In the following, we state some important properties of the discrete operator needed for the analysis of the fully discrete method. Proofs of the first results can be found in [23, Sec. 4.3]. Note again that, despite the fact that the results therein are given w.r.t. the standard \({L^2}\)-inner products, the proofs can be carried out completely analogously in the weighted setting. The first proposition shows that the discrete operator is consistent in the sense that its application to a sufficiently smooth function yields the projection of the continuous operator applied to this function. Further, it states that the discrete operator inherits the dissipativity on the approximation space.

Proposition 3.6

The discrete Friedrichs’ operator fulfills the consistency property

Further, its restriction to is dissipative, i.e., we have

Note that this immediately implies that is also maximal dissipative, since is finite dimensional.

We formulate the following two results as a slightly more general version than the respective ones given and proved in [23]. We need these more general results for the last property of the discrete operator stated in this section. However, as the proofs are completely analogous to the ones given in [23, Sec. 4.3 & Appendix] by using the broken weighted \({L^2}\)-norms \(\Vert h^{p} \cdot \Vert _{\Omega }\) instead of the non-broken version, we omit them here. The first result states that the discrete operator satisfies an inverse inequality, reflecting the corresponding property (6) of the original operator.

Proposition 3.7

Let . Then, for all \(p\in {\mathbb {Z}}\), the discrete Friedrichs’ operator fulfills the inverse inequality

and, in particular,

The constants are given by and with .

The next result gives a bound on the broken weighted \({L^2}\)-norm of applied to the projection error \(e_{\pi }^{v}\) of a sufficiently smooth function \(v\) defined in (7). In some sense, this quantifies how well the discrete operator approximates the continuous one, as for , we have by Proposition 3.6.

Proposition 3.8

Let for \(0 \le q \le k\). Then, for all \(p\in {\mathbb {Z}}\), we have

and, in particular,

The constants are given by and .

The last result is another approximation property and generalizes Proposition 3.8 to more than one discrete operator. We point out that this result and its proof are generalizations of [35, Thm. 6.3]. There, the assumption of a quasi-uniform mesh sequence is needed and the result is restricted to powers of one particular operator (namely the Maxwell operator and its central and upwind fluxes dG discretization). Note that for each operator that is applied, we lose one order of \(h\) in the approximation. The proof is given in the appendix.

Lemma 3.9

Let be Friedrichs’ operators with corresponding domains ,\(\ldots \), and let be their respective central fluxes dG discretizations. Further, let for \(r-1 \le q \le k\). Then, for all \(p \in {\mathbb {Z}}\) we have

(8)

and, in particular,

where the constants are independent of .

4 Full discretization

This section is concerned with deriving the full discretization of the wave-type problem (2). To this end, we use a method-of-lines approach and first spatially discretize before we discretize in time. We achieve the first step by replacing the continuous operator by its discrete counterpart and projecting the data onto the discrete space . This yields the spatially wave-type problem

figure c

with and initial value .

The spatially discrete problem (9) is an evolution equation posed on the finite-dimensional approximation space . Hence, and since the discrete operator is dissipative (and maximal due to the finite-dimensionality), its wellposedness and stability can be analyzed completely analogously to the original problem.

Full discretization is now achieved by discretizing (9) in time via the Peaceman–Rachford scheme. Before we can do so, we have to introduce a splitting of the (discrete) spatial operator, since the Peaceman–Rachford scheme is a splitting scheme. There are two ways to achieve this goal, which, in this case, lead to the same result. Namely, we either split the continuous operator, leading to two Friedrichs’ operators, which we then discretize via the dG method. Or we discretize the full operator and then split the discrete one. As we deem it to be the more systematic way, we present the first approach in the next section.

4.1 Splitting

We split the Friedrichs’ operator into two operators by splitting its coefficients. More precisely, we split \(L_{i}=A_{i}+B_{i}\) for all \(i=0,\ldots ,{d}\) such that \(A_{0},B_{0}\in {\mathbb {R}}^{m\times m}\) are negative semi-definite and \(A_{1},B_{1},\ldots ,A_{{d}},B_{{d}}\in {\mathbb {R}}^{m\times m}\) are symmetric. This leads to two operators

and analogously to we define and , respectively. We extend all concepts introduced in Sect. 2 to the split operators, using analogous notation.

Additionally, we assume that we can split the boundary operator accordingly, meaning that we have with and fulfilling Assumption 2.3 w.r.t. and , respectively. Moreover, we assume that both and satisfy the analogue of Assumption 3.3 with the respective boundary fields denoted by and . By the same reasoning as in Sect. 2, this yields that and are maximal dissipative if restricted to and , respectively.

As we are interested in a splitting of the discrete operator, we also discretize these split operators. Hence, we define the discrete operator domains

associated with and , respectively, and the central fluxes dG discretizations and of the Friedrichs’ operators and analogously to Definition 3.5. Using bilinearity of the inner product and the properties of the coefficients and boundary fields discussed above yields

(10)

i.e., and indeed constitute a splitting of .

4.2 Peaceman–Rachford scheme

We now use the Peaceman–Rachford scheme to obtain the fully discrete scheme that we analyze in the remainder of the paper. Let \(\tau >0\) be the timestep size, , and . The Peaceman–Rachford scheme applied to the wave-type problem (9) is given by

figure d

where \(\pmb {u}_{\tau }^{n}\approx u(t_{n})\) is the fully discrete approximation at time \(t_{n}\), \(n\in {\mathbb {N}}\), and \(\pmb {u}_{\tau }^{n+1/2}\) is an intermediate value.

We point out that (11) is in fact equivalent to the scheme used in [9, 34], which relies on a different intermediate value \(\pmb {u}_{\tau }^{n+1/2}\) (for \(f\ne 0\)) but produces the same \(\pmb {u}_{\tau }^{n}\). In particular, one can show that this change results in \(\pmb {u}_{\tau }^{n+1/2}\) being an approximation to \(u(t_{n+1/2})\) of the same order as \(\pmb {u}_{\tau }^{n}\) is to \(u(t_{n})\). This can be shown by using exactly the same arguments we use later.

To analyze the scheme, it is convenient to recast (11) into the equivalent form

figure e

where is defined as

(13)

and

(14)

Note that the resolvents of and exist because they are maximal dissipative.

This readily implies the following result, which states that the fully discrete scheme is wellposed and provides a closed solution formula for the approximation.

Theorem 4.1

For all and all \(\tau >0\) there exists a unique fulfilling the fully discrete scheme (12) given by the discrete variation-of-constants formula

(15)

Next, we show that the fully discrete scheme is unconditionally stable, which is a well-known fact for the Peaceman–Rachford scheme in this maximal dissipative setting. We follow the proof in [21] to show stability of the full discretization. However, some adaptions are necessary for the fully discrete version to get a bound that is independent of the discretization parameters. We proceed in two steps and first give a bound on arbitrary powers of the system operator .

Theorem 4.2

Let and \(q\in {\mathbb {N}}\). Then, for all and all \(\tau >0\), we have

Proof

For arbitrary \(q\in {\mathbb {N}}\) and , we have

with . Both and are maximal dissipative (in the \(M\)-norm), and thus both their resolvents as well as the transforms and , respectively, are contractive (in the \(M\)-norm), see e.g., [39] for a proof of the latter. This proves the claim. \(\square \)

Note that the occurrence of the discrete operator on the right-hand side means that the bound provided in Theorem 4.2 is not uniform in . However, the next result shows that the scheme is unconditionally stable nonetheless.

Corollary 4.3

For all and all \(\tau >0\), the approximation \(\pmb {u}_{\tau }^{n+1}\) given by the fully discrete scheme (12) satisfies

If and , we have

Proof

The discrete variation-of-constants formula (15) and Theorem 4.2 together with the contractivity of yields

Using the triangle inequality shows the first bound.

To show the second one, we add and subtract and use Proposition 3.6 (consistency) and the contractivity of \(\pi _{h}\) to obtain

The bound on this term follows by Proposition 3.8 (approximation property) and proceeding analogously for the term involving proves the claim. \(\square \)

Next, we show the discrete analogon to the second bound in Corollary 2.4. Since this stability result involves discrete derivatives of the approximations, we define the discrete time derivative and the discrete space derivative at time \(t_{n+1/2}\) as

respectively. While the definition of the discrete time derivative is rather intuitive, the discrete space derivative is more involved. Its structure is due to the splitting nature of the Peaceman–Rachford scheme. In fact, if one considers the semi-discrete analysis in time, one sees that the full-step approximations at time \(t_{n}\) are only contained in , whereas the half-step approximations at time \(t_{n+1/2}\) are only contained in , cf., [29] for details. Hence, one has to use the split operators to obtain a reasonable approximation on the whole family of meshes.

Corollary 4.4

For all and all \(\tau >0\), the approximations \(\big \{\pmb {u}_{\tau }^{n}\big \}_{n\ge 0}\) and \(\big \{\pmb {u}_{\tau }^{n+1/2}\big \}_{n\ge 0}\) given by the fully discrete scheme (11) satisfy

(16)

where \(C\) is independent of , \(\tau \) and n if \(t_n \le T\) for some \(T>0\), and .

Proof

First, note that by (14) we have

(17)

Further, the definition (13) of and the discrete splitting property (10) yields

We point out that taking the limit \(\tau \rightarrow 0\), we obtain the derivative of w.r.t. \(\tau \) evaluated at 0 on the left-hand and the discrete operator on the right-hand side. This corresponds to the fact that is a (time-)discrete version of the semigroup generated by and this relation reflects the fact that the derivative of a semigroup evaluated at 0 yields its generator.

Having this in mind, we take the discrete derivative of the sequence \(\{\pmb {u}_{\tau }^{n}\}_{n\ge 0}\) and apply the discrete variation-of-constants formula (15) and (17) to obtain

where we further performed an index shift to combine the two sums. Note that this can be seen as applying a discrete version of the Leibnitz rule of integration. Taking norms and applying Theorem 4.2 yields an appropriate bound on .

Thus, it remains to show the bound on to prove (16). To do so, we add the (half-step) Peaceman–Rachford iterations (11a) and (11b) to obtain

(18)

Taking norms and using the already established bound on yields (16).

For the uniform bound, we use the fundamental theorem of calculus to obtain

and analogously for the same term including . The remaining terms can be bounded as in the last part of the proof of Corollary 4.3. For completeness, we state the concrete bound in the appendix. \(\square \)

5 Error analysis

In this section, we derive the main results of this paper, namely the error bounds for the fully discrete scheme (11) resulting from the Peaceman–Rachford scheme in time and a central fluxes dG discretization in space. More precisely, we show that the approximation \(\pmb {u}_{\tau }^{n}\) gained from performing n steps of this scheme converges to the exact solution \(u(t_{n})\) of the original problem (2) at time \(t_{n}\) with order two in time (the classical order of the Peaceman–Rachford scheme) and order \(k\) in space, given that the solution is sufficiently smooth. Further, we show that discrete derivatives of the approximations w.r.t. space and time converge to their continuous counterparts exhibiting the same rates if a bit more regularity is assumed.

In order to perform the analysis, we split the full discretization error \(e^{n}\) into

$$\begin{aligned} e^{n} = u(t_{n}) - \pmb {u}_{\tau }^{n} = e_{\pi }^{n} + \pmb {e}^{n}, \end{aligned}$$
(19)

where \( e_{\pi }^{n} = u(t_{n}) - \pi _{h}u(t_{n}) \) is the projection error at time \(t_n\) and \( \pmb {e}^{n} = \pi _{h}u(t_{n}) - \pmb {u}_{\tau }^{n} \) is the discretization error after n steps. Note that by Lemma 3.2 we already have a bound on \( e_{\pi }^{n} \) of order \(k+1\) for sufficiently smooth solutions. Thus, it suffices to bound the discretization error \(\pmb {e}^{n}\). Besides this, we also show bounds for the time derivative error

and the space derivative error

5.1 Error recursion

We start by showing that the discretization error \(\pmb {e}^{n}\) satisfies the fully discrete scheme (12) up to a defect. To keep the notation concise we define via

abbreviating the concatenation of the resolvents of and .

The error analysis is based on the fact that the Peaceman–Rachford scheme can be interpreted as a perturbation of the well-known Crank–Nicolson scheme. Thus, we decompose the full defect into a defect already present in the Crank–Nicolson scheme (which corresponds to the quadrature error of the trapezoidal rule) and an additional defect caused by the perturbation.

Lemma 5.1

Let and \(\tau >0\). Then, for all \(n\in {\mathbb {N}}_0\), the discretization error \(\pmb {e}^{n+1} = \pi _{h}u(t_{n+1}) - \pmb {u}_{\tau }^{n+1}\) of the dG-Peaceman–Rachford scheme satisfies

figure f

where the dG-Crank–Nicolson defect \(\pmb {d}_{\textsc {cn}}^{n}\) is given by

and the (dG-Peaceman–Rachford) perturbation defect is given by

Proof

We begin by inserting the projected exact solution into the recursion (12a) of the fully discrete scheme. This causes an error, which we define as and we thus obtain

Applying and solving for the defects then yields

Expanding the products and using the splitting property (10) proves the claim. \(\square \)

As a consequence, Theorem 4.1 yields the representation formula

(21)

for the discretization error. Further, by Theorem 4.2, this representation formula immediately implies an error bound for our scheme if the defects fulfill appropriate bounds.

Note that the Crank–Nicolson defect already closely resembles the (projected) quadrature error \(\delta _{\textsc {cn}}^{n}\) of the trapezoidal rule applied to \(\partial _{t}u\), i.e.,

(22)

where we used the fundamental theorem of calculus and the differential equation (2a) for the second equality. The only difference is that the second term involves the operator instead of . This discrepancy results in the spatial error term.

Moreover, after again applying the fundamental theorem, the perturbation defect is already of order three in \(\tau \), which is the order required to obtain order two globally. The only task still to be done is thus to show that the remaining factors can be bounded independently of the discretization parameters. In fact, these observations will be key to bounding the defect as we will see in the next section.

5.2 Bounds on the defects

Next, we derive appropriate bounds on the defects occurring in the error recursion (20). We start with the dG-Crank–Nicolson defect.

Lemma 5.2

Let and \(\tau >0\). Further, assume that . Then we have

(23)

Further, if we have

(24)

Proof

We exploit the observation made at the end of Sect. 5.1 and rewrite \(\pmb {d}_{\textsc {cn}}^{n}\) as

where we have added and subtracted the term involving for the first and used Proposition 3.6 (consistency) for the second equality. The first term is just the projected quadrature error (22) of the trapezoidal rule. Using the associated Peano kernel representation, its \(M\)-norm can be bounded by the first term in (23). The \(M\)-norm of the second term can be bounded by using Proposition 3.8 (approximation property). Combining these bounds yields (23).

For the second bound (24), we take the discrete derivative of \(\pmb {d}_{\textsc {cn}}^{n}\), which yields

(25)

We use the definition of \(\delta _{\textsc {cn}}^{n}\) in (22) together with multiple applications of the fundamental theorem of calculus and the substitution \( s \rightarrow s+\tau \) to obtain

$$\begin{aligned} \begin{aligned} \delta _{\textsc {cn}}^{n} - \delta _{\textsc {cn}}^{n-1}&= \int _{t_{n-1}}^{t_{n}} \Big ( \partial _{t}u(s+\tau ) - \partial _{t}u(s) - \tfrac{\tau }{2} \big ( \partial _{t}^2 u(s+\tau ) + \partial _{t}^2 u(s) \big ) \Big ) \,\text {d }s\\&= \int _{t_{n-1}}^{t_{n}} \Big ( \int _{s}^{s+\tau } \partial _{t}^2u(\varsigma )\,\text {d }\varsigma - \tfrac{\tau }{2} \big ( \partial _{t}^2 u(s+\tau ) + \partial _{t}^2 u(s) \big ) \Big ) \,\text {d }s. \end{aligned} \end{aligned}$$
(26)

The integrand w.r.t. s is again the quadrature error of the trapezoidal rule and the bound thus follows from its Peano kernel representation (and transformation of the integrals).

For the second term in (25) we use the fundamental theorem of calculus to obtain

Using Proposition 3.8 (approximation property) concludes the proof. \(\square \)

Next, we bound the perturbation defect, again exploiting the ideas stated at the end of Sect. 5.1. In fact, the approach is similar to the one used in the proof of Lemma 5.2, meaning that we replace the discrete operators (which can only be bounded in negative powers of , not uniformly) by their continuous counterparts.

Lemma 5.3

Let , \(\tau >0\) and \(k\ge 1\). Further, assume that we have , and . Then we have

Further, if and , we have

where the constants are given by

and .

Proof

We use the fundamental theorem of calculus and take the norm to obtain

Following the approach used for the double integral in (26) we have

We show the bound on . The remaining terms can be treated analogously. Adding and subtracting yields

Using the contractivity of the \({L^2}\)-projection for the first and Lemma 3.9 (with \(r=2\), \(p=0\) and \(q=1\)) for the second term concludes the proof. The exact constants can be derived by explicitly executing the first induction step in the proof of Lemma 3.9\(\square \)

5.3 Fully discrete error bounds

We are now able to state the main results of this paper. Since the assumptions for all results in this section are similar, we encapsulate them in the following assumption.

Assumption 5.4

For \(\ell \in {\mathbb {N}}\), the exact solution of the wave-type problem (2) satisfies and the inhomogeneity satisfies . Further, the material tensor fulfills .

Our first main result gives bounds on the full discretization error of the scheme. Note that the regularity assumptions posed on the exact solution are in fact equivalent to the combination of the corresponding ones posed in Lemmas 5.2 and 5.3. Further, we point out that in the general setting of this paper, these convergence rates are expected, since they coincide with the classical order of the Peaceman–Rachford scheme and, in this general setting, the optimal convergence rate for the central fluxes dG method [32], respectively.

Theorem 5.5

Let , \(\tau >0\), let \(k\ge 1\) be the polynomial degree of the dG method, and let Assumption 5.4 be fulfilled with \(\ell =1\). Then, for all \(n\in {\mathbb {N}}_0\), the dG-Peaceman–Rachford error satisfies

where only depends on , , , , , , , , , and , .

Proof

We decompose the error as in (19). The projection error \(e_{\pi }^{n+1}\) is bounded by Lemma 3.2. Thus, it remains to bound the discretization error \(\pmb {e}^{n+1}\). We use (21) together with Theorem 4.2 to obtain

The claim now follows by Lemmas 5.2 and 5.3. \(\square \)

Owing to the stability bound on the discrete derivatives in Corollary 4.3, we are also able to show that the errors \(\pmb {e}_{\tau }^{n+1/2}\) and converge with the same orders if we assume some additional regularity. For the sake of readability, we do not give the details of the full bounds as in Theorem 5.5 here. However, they can be found in the appendix.

We start with the time derivative error. Note that we again need the combined regularity already required for the corresponding bounds in Lemmas 5.2 and 5.3.

Theorem 5.6

Let , \(\tau >0\), let \(k\ge 1\) be the polynomial degree of the dG method, and let Assumption 5.4 be fulfilled with \(\ell =2\). Then, for all \(n\in {\mathbb {N}}_0\), the full dG-Peaceman–Rachford time derivative error satisfies

where \(C\) is independent of , \(\tau \) and n if \(t_n \le T\) for some \(T>0\).

Proof

As for the dG-Peaceman–Rachford error, we first split the full error into a projection error and the discretization error \(\pmb {e}_{\tau }^{n+1/2}\). The projection error can again be bounded by Lemma 3.2 and it thus remains to bound .

First, note that the derivative error \(\pmb {e}_{\tau }^{n+1/2}\) fulfills

where we have used that the first term in the second line is the quadrature error of the midpoint rule. Hence, it remains to bound . We do this by again applying the error representation (21), which yields

Taking the norm and using the stability result Theorem 4.2 and the bounds on the defects in Lemmas 5.2 and 5.3 (together with transforming some integrals) yields the desired bound. \(\square \)

Lastly, we show the error bound for the approximate space derivative. Note that besides the combination of the corresponding assumptions in Lemmas 5.2 and 5.3 we need some additional regularity of the inhomogeneity.

Theorem 5.7

Let , \(\tau >0\), let \(k\ge 1\) be the polynomial degree of the dG method, let Assumption 5.4 be fulfilled with \(\ell =2\), and . Then, for all \(n\in {\mathbb {N}}_0\), the full dG-Peaceman–Rachford space derivative error satisfies

where \(C\) is independent of , \(\tau \) and n if \(t_n \le T\) for some \(T>0\).

Proof

Again, we first split the full error into a projection and a discretization part. Note that by we immediately obtain via the original differential equation (2a), allowing us to bound the projection error. Hence, it remains to bound the discretization error .

To do so, we compare (18) to the projected original differential equation (2a) at time \(t_{n+1/2}\) to obtain

We have already bounded \(\pmb {e}_{\tau }^{n+1/2}\) in the proof of Theorem 5.6 and the second term can be bounded by Taylor expansion. The last term can be bounded by using the fundamental theorem of calculus and subsequently proceeding analogously to the corresponding part of the proof of Lemma 5.2. \(\square \)

6 Numerical experiments

In this section, we present numerical experiments to verify the theoretical results obtained in this paper. Three different cases are considered, all of them consisting of the full 3D Maxwell equations with perfectly conducting boundary conditions, each time supplied with different data. Each data set is chosen such that there is an analytical solution with which the approximations can be compared to obtain the exact approximation error.

6.1 Linear Maxwell equations

For all cases, we consider the linear, isotropic and undamped Maxwell equations on \( \Omega = [0,2]\times [0,1]^2\) in the following form. Given a three-dimensional, open, bounded and connected Lipschitz domain \(\Omega \subset {\mathbb {R}}^3\), we seek the electric field \(E:{\mathbb {R}}_{+}\times \Omega \rightarrow {\mathbb {R}}^3\) and the magnetic field \(H:{\mathbb {R}}_{+}\times \Omega \rightarrow {\mathbb {R}}^3\) solving the Maxwell system

figure g

Here, the initial data \(E^{0},H^{0}:\Omega \rightarrow {\mathbb {R}}^3\), external current \(J:{\mathbb {R}}_{+}\times \Omega \rightarrow {\mathbb {R}}^3\) and material parameters \(\varepsilon ,\mu :\Omega \rightarrow {\mathbb {R}}\setminus \{0\}\) (permittivity and permeability, respectively) are given. These equations are supplied with perfectly conducting boundary conditions on \(\Gamma =\partial \Omega \), i.e., we require

$$\begin{aligned} {\mathfrak {n}} \times E= 0 \quad \text { on } \Gamma , \end{aligned}$$
(27d)

where \({\mathfrak {n}}\) is the outward normal vector on \(\Gamma \).

Defining

$$\begin{aligned} u= \begin{pmatrix} E\\ H\end{pmatrix} , \qquad u^0= \begin{pmatrix} E^{0}\\ H^{0}\end{pmatrix} , \qquad g= \begin{pmatrix} -J\\ 0 \end{pmatrix} , \end{aligned}$$

and

we see that (27) can be written in the form of (1). Further, by [11, Lem. 3.5], the perfectly conducting boundary conditions (27d) define an operator fulfilling Assumptions 2.3 and 3.3. Hence, if we have \(\varepsilon ,\mu \in {L^{\infty }}(\Omega )\) and \({J\in C({\mathbb {R}}_{+};{L^2}(\Omega )^3)}\) this problem fits the framework of this paper with \(d=3\) and \(m=6\).

In order to employ the Peaceman–Rachford method, we use the splitting proposed in [33, 45]. In particular, we first split the curl operator into

and with this define the split operators

It can be shown that these split operators fulfill all necessary assumptions for our theory and we refer to [29, Sec. 6.5.3] for the details.

The scheme was implemented with the help of the C++ finite element library deal.ii [1], which was used to discretize the operators in space. The code can be found at https://www.waves.kit.edu/dg-ADI.php. All experiments were performed on uniform tensorial meshes of various mesh widths and we used a polynomial degree of \(k= 2\) on all elements for the dG method. Lastly, the simulation interval for all experiments was chosen to be [0, 2] and we plot the maximal error over all timesteps in all graphs.

Cavity solution. As a first example, we consider the well-known cavity solution of the homogeneous Maxwell system with constant material parameters. In particular, we set \(J\equiv 0\), assume \(\varepsilon , \mu \in {\mathbb {R}}\) to be constant and consider the family of solutions to (27) given by

$$\begin{aligned} \begin{aligned} E(t,x)&= \varepsilon ^{-1} \begin{pmatrix} {\widehat{E}}_1\, \cos (\kappa _{1} x_{1})\, \sin (\kappa _{2} x_{2})\, \sin (\kappa _{3} x_{3}) \\ {\widehat{E}}_2\, \sin (\kappa _{1} x_{1})\, \cos (\kappa _{2} x_{2})\, \sin (\kappa _{3} x_{3}) \\ {\widehat{E}}_3\, \sin (\kappa _{1} x_{1})\, \sin (\kappa _{2} x_{2})\, \cos (\kappa _{3} x_{3}) \end{pmatrix} \cos (\Theta t), \\ H(t,x)&= c^2\Theta ^{-1} \begin{pmatrix} ({\widehat{E}}_2\kappa _3 - {\widehat{E}}_3\kappa _2)\, \sin (\kappa _{1} x_{1})\, \cos (\kappa _{2} x_{2})\, \cos (\kappa _{3} x_{3}) \\ ({\widehat{E}}_3\kappa _1 - {\widehat{E}}_1\kappa _3)\, \cos (\kappa _{1} x_{1})\, \sin (\kappa _{2} x_{2})\, \cos (\kappa _{3} x_{3}) \\ ({\widehat{E}}_1\kappa _2 - {\widehat{E}}_2\kappa _1)\, \cos (\kappa _{1} x_{1})\, \cos (\kappa _{2} x_{2})\, \sin (\kappa _{3} x_{3}) \end{pmatrix} \sin (\Theta t) \end{aligned}\quad \end{aligned}$$
(28)

for \((t,x)\in {\mathbb {R}}_{+}\times \Omega \). Here, we denote by \(c=(\varepsilon \mu )^{-1/2}\) the speed of light, \(\kappa =(\kappa _1,\kappa _2,\kappa _3)\in {\mathbb {R}}_{+}^3\) is the wave vector and \(\Theta =c\,\Vert \kappa \Vert \) is the angular frequency. Further, \({\widehat{E}}_1, {\widehat{E}}_2, {\widehat{E}}_3\) are preset amplitudes of the waves. For our numerical experiment we chose the parameter set

$$\begin{aligned}\varepsilon \equiv \mu \equiv 1, \qquad \kappa _1 = \kappa _2 = \kappa _3 = 2\pi , \qquad \text {and} \qquad {\widehat{E}}_1=-1, \quad {\widehat{E}}_2=0, \quad {\widehat{E}}_3=1,\end{aligned}$$

which, in particular, leads to a solution satisfying the perfectly conducting boundary condition (27d).

Varying material parameters. For the second example, we adapt the cavity solution such that it allows for varying material parameters. In fact, one can show that (28) is a solution to the homogeneous (i.e., \(J\equiv 0\)) Maxwell equations (27) for sufficiently smooth \(\varepsilon ,\mu :\Omega \rightarrow {\mathbb {R}}\) with \(\mu \equiv \frac{1}{\varepsilon }\) and \(({{\,\mathrm{\nabla \!}\,}}\varepsilon )\times E= 0\) on \(\Omega \) for all \(t\in {\mathbb {R}}_{+}\).

We exploit this and choose the solution given by (28) with the parameters

$$\begin{aligned}\varepsilon (x) = \frac{1}{\mu (x)} = x_1^2 + 1, \quad \kappa _1 = \kappa _2 = \pi , \quad {\widehat{E}}_1 = 1, \quad \text {and} \quad \kappa _1 = {\widehat{E}}_2 = {\widehat{E}}_3 = 0,\end{aligned}$$

for \(x\in \Omega \). Besides satisfying the above mentioned criteria, note that, again, the resulting solution also fulfills the perfectly conducting boundary conditions (27d).

Inhomogeneous Problem. As a last example we consider the following solution to the inhomogeneous Maxwell equations. Let \(\Phi \in C^2(\Omega )\) with \({\mathfrak {n}} \times {{\,\mathrm{\nabla \!}\,}}\Phi = 0\) on \(\Gamma \) and \(\Psi \in C^1({\mathbb {R}})\). Then, for \(x\in \Omega \), \(t\in {\mathbb {R}}_{+}\), the solution of (27) with \(J(t,x) = -\Psi '(t){{\,\mathrm{\nabla \!}\,}}\Phi (x)\) and \(\varepsilon \equiv \mu \equiv 1\) is given by

$$\begin{aligned} E(t,x) = \Psi (t) {{\,\mathrm{\nabla \!}\,}}\Phi (x) , \qquad H(t,x) = 0. \end{aligned}$$

In particular, we choose

$$\begin{aligned} \Phi (x) = ( x_1^2 - 2 x_1 ) ( x_2^2 - x_2 ) ( x_3^2 - x_3 ), \qquad \Psi (t) = t^4 + \tfrac{5}{2} t^3 + 3 t^2 + 3 t + 1, \end{aligned}$$

for this example.

6.2 Results

First, note that all three considered examples are sufficiently regular to fulfill the requirements of our main results Theorems 5.5, 5.6 and 5.7. Hence, we expect at least the convergence orders presented in these theorems.

Further, since the first two examples are homogeneous, both the discrete as well as the continuous objects considered in Theorems 5.6 and 5.7 coincide by the numerical scheme (12) and the continuous problem (2), respectively. Therefore, we expect the same errors for both, which was indeed the case in all numerical results.

We performed several simulations with varying meshsizes and timesteps \(\tau \) to verify our theoretical results. The resulting errors are displayed in Figs. 1, 2, 3, 4 and 5.

Fig. 1
figure 1

Errors produced by the fully discrete scheme (11) applied to the problem solved by the cavity solution plotted against the timestep \(\tau \). The employed mesh sizes are given in the legend

Fig. 2
figure 2

Errors produced by the fully discrete scheme (11) applied to the problem with varying material parameters plotted against the timestep \(\tau \). The employed mesh sizes are given in the legend

Fig. 3
figure 3

Errors produced by the fully discrete scheme (11) applied to the inhomogeneous problem plotted against the timestep \(\tau \). The employed mesh sizes are given in the legend

Fig. 4
figure 4

Errors produced by the fully discrete scheme (11) applied to the problem solved by the cavity solution plotted against the mesh width . The approximations were produced by using 5120 timesteps for time integration

Fig. 5
figure 5

Errors produced by the fully discrete scheme (11) applied to the problem with varying material parameters plotted against the mesh width . The approximations were produced by using 5120 timesteps for time integration

In all experiments, one clearly sees the second-order convergence in time (whenever the spatial error is small enough so that the temporal error is dominant). The spatial error contained in \(\pmb {e}^{n}\), however, behaves about an order better than predicted in the homogeneous examples, i.e., we see convergence of order about \(k+1\) in . This is probably due to the high regularity of both the considered solutions and the employed meshes. Such an improved order of convergence on a regular rectangular grid was shown in [30] for the neutron transport equation in dimension two. For general meshes and less regular solutions this might not be the case, see e.g., [40, Fig. 3.3] for a counterexample on unstructured meshes. In addition, this is not the case for the errors in the derivatives, and (which coincide here as explained before), where we see second-order convergence. In the inhomogeneous example we see no influence of the spatial error at all. However, this is to be expected, since we used \(k=2\) in the experiments and thus both the solution and the inhomogeneity (as well as their spatial derivatives) are contained in the approximation space (for all \(t\in {\mathbb {R}}_{+}\)). Hence, it is easy to see that the defects derived in Sect. 5.1 (and consequently the derived bounds on the errors) are in fact independent of , which explains this behavior.

Lastly, note that the errors in the space derivative of the solution corresponding to Theorem 5.7 are of approximately one to two orders of magnitude higher than those of the error in the solution. This can probably be explained by the fact that additional terms involving the inhomogeneity enter the error constant.