1 Introduction

The propagation of electromagnetic waves through a non-dispersive linear medium can be described by the time-dependent Maxwell’s equations

$$\begin{aligned} \varepsilon \partial _{t}E + {{\,\textrm{curl}\,}}H &= -j, \end{aligned}$$
(1)
$$\begin{aligned} \mu \partial _{t}H + {{\,\textrm{curl}\,}}E &= 0, \end{aligned}$$
(2)

together with appropriate initial and boundary conditions. Here E, H denote the electric and magnetic field intensities, \(\varepsilon \), \(\mu \) the corresponding material parameters, and j describes the density of source and eddy currents. An efficient discretization of (1)–(2) can be achieved by the finite difference time domain (FDTD) method or the finite integration technique (FIT), see e.g. [14, 15], and for isotropic materials and orthogonal grids, second-order convergence can be obtained in space and time. In order to handle complex geometries, several attempts have been made to generalize these methods to non-orthogonal and unstructured grids; see e.g. [2, 12, 13] and also [3, 4] for more recent results. A rigorous error analysis of a Yee-like scheme on triangles and tetrahedra was given in [6], and first-order convergence in space on general unstructured grids was demonstrated theoretically and numerically.

Scope. In this paper, we propose a novel Yee-like discretization scheme for hybrid grids in two space dimensions, consisting of triangles and rectangles. The method is based on a finite element approximation with mass-lumping through numerical quadrature, which allows for a rigorous error analysis; see [5, 9] for background. On rectangular grid cells, the resulting discretization coincides with that of the FIT or FDTD method. Following [8], additional internal degrees of freedom are introduced on triangular grid cells, which allows us to prove discrete stability without severe restrictions on the mesh. The lowest order approximation on two-dimensional hybrid grids is studied in detail. The main ideas behind the construction of the method and its analysis however carry over to three dimensions and higher-order approximations; see [7, 8, 11] and the discussion at the end of the paper.

2 Description of the Problem

Let us start with completely specifying the model problem to be considered in the rest of the paper. We choose \(\varepsilon =\mu =1\) and abbreviate \(f=-\partial _{t}j\). Moreover, we consider the second-order form of Maxwell’s equations, i.e.,

$$\begin{aligned} \partial _{tt}E +{{\,\textrm{curl}\,}}({{\,\textrm{curl}\,}}E) &= f, \qquad {} & {} \text {in }\varOmega , \end{aligned}$$
(3)
$$\begin{aligned} n\times {{\,\textrm{curl}\,}}(E) &= 0,\qquad {} & {} \text {on }\partial \varOmega , \end{aligned}$$
(4)

with simple boundary conditions. The computational domain \(\varOmega \subseteq \mathbb {R}^2\) is assumed to be a bounded Lipschitz polygon and \({{\,\textrm{curl}\,}}E = \partial _x E_2 - \partial _y E_1 \) denotes the curl of a vector field \(E=(E_1,E_2)\) in two space dimensions. The above differential equations are considered on a finite time interval [0, T], and complemented by suitable initial conditions \(E(0)=E_0\) and \(\partial _{t}E(0) = F_0\). The existence of a unique solution can then be established by semi-group theory or Galerkin approximation. Solutions of (3)–(4) can further be characterized equivalently by the variational identities

$$\begin{aligned} (\partial _{tt}E(t),v)+({{\,\textrm{curl}\,}}E(t),{{\,\textrm{curl}\,}}v) = (f(t),v), \end{aligned}$$
(5)

for all \(v\in H({{\,\textrm{curl}\,}},\varOmega )= \{E\in L^2(\varOmega )^2\,:\, {{\,\textrm{curl}\,}}E\in L^2(\varOmega )\}\) and a.a. \(t \in [0,T]\). For abbreviation, we write \((a,b)=\int _\varOmega a \cdot b \, dx\) for the scalar product on \(L^2(\varOmega )\) and \(L^2(\varOmega )^2\).

3 A Finite Element Method with Mass-Lumping

Let \(\mathscr {T}_h\) = \(\{K\}\) be a geometrically-conforming quasi-uniform shape-regular partition of \(\varOmega \) into triangular and/or rectangular elements K. By assumption, all edges of the mesh are of similar length and we call the size h of the longest edge the mesh size.

Finite Element Spaces. For the approximation of the field E on individual elements, we consider local polynomial spaces defined by

$$\begin{aligned} V(K) = \left\{ \begin{array}{ll} {{\,\mathrm{\mathscr {N}}\,}}_0(K), \qquad &{} \text { if }K \text { is a square,} \\[.3em] {{\,\mathrm{\mathscr {N}}\,}}_0^+(K) = {{\,\mathrm{\mathscr {N}}\,}}_0(K) + {{\,\mathrm{\mathscr {B}}\,}}(K), \qquad &{} \text { if } K \text { is a triangle}. \end{array}\right. \end{aligned}$$
(6)

Here \({{\,\mathrm{\mathscr {N}}\,}}_0(K)\) is the lowest order Nedelec space for triangles or rectangles [1, 10], and \({{\,\mathrm{\mathscr {B}}\,}}(K)\) is a space of three quadratic functions with vanishing tangential components. The corresponding degrees of freedom are depicted in Fig. 1, and details on the basis functions are presented in Sect. 5.The global finite element space is finally defined by \(\mathscr {V}_h= \{v_h\in H({{\,\textrm{curl}\,}};\varOmega )\,:\,\, v_h|_K\in V(K) \ \forall K \in \mathscr {T}_h\}.\)

Fig. 1.
figure 1

Degrees of freedom for the space \({{\,\mathrm{\mathscr {N}}\,}}_0(K)\) on the rectangle (left) and the space \({{\,\mathrm{\mathscr {N}}\,}}_0^+(K)\), introduced in [8], on the triangle (right). The three internal degrees of freedom for the bubble functions are displayed in red and the corresponding quadrature points are depicted as blue dots. (Color figure online)

Quadrature. We use an approximation \((u,v)_{h}:=\sum _{K}(u,v)_{h,K}\) for the \(L^2\)-scalar product, with contributions obtained by numerical integration. On the triangle, we set

$$\begin{aligned} (u,v)_{h,K} = |K| \sum _{i=1}^{3}\;\tfrac{1}{3}\,u(m_{K,i})\cdot v(m_{K,i}), \end{aligned}$$
(7)

where \(m_{K,i}\) is the midpoint of the edge \(e_i\) opposite to vertex i; see Fig. 1. For the rectangle, we proceed differently: Here we decompose \((u,v) = (u_1, v_1) + (u_2,v_2)\) into two contributions for the orthogonal directions, and then use different quadrature rules for the two contributions, i.e.

$$\begin{aligned} (u,v)_{h,K} = |K| \left( \sum _{i=1}^2 \tfrac{1}{2} u_1(m_{K,h,i}) v_1(m_{K,h,i}) + \sum _{j=1}^2 \tfrac{1}{2} u_2(m_{K,v,j}) v_2(m_{K,v,j}) \right) . \end{aligned}$$
(8)

Here \(m_{K,h,i}\) and \(m_{K,h,j}\) are the midpoints of the horizontal and vertical edges, respectively; see again Fig. 1. For the semi-discretization of our model problem in space, we then consider the following inexact Galerkin approximation.

Problem 1

Let \(E_{h,0}\), \(E_{h,1} \in \mathscr {V}_h\) be given. Find \(E_h:[0,T]\rightarrow \mathscr {V}_h\) such that

$$\begin{aligned} (\partial _{tt} E_h(t),v_h)_h + ({{\,\textrm{curl}\,}}E_h(t),{{\,\textrm{curl}\,}}v_h) = (f(t), v_h) \end{aligned}$$
(9)

for all \(v_h\in \mathscr {V}_h\) and all \(t\in [0,T]\), and such that \(E_h(0)=E_{h,0}\) and \(\partial _{t} E_h(0)=E_{h,1}\).

As we will indicate below, the implementation of this method leads to a diagonal mass matrix, which allows using explicit methods for efficient time integration.

4 Main Results

By elementary computations, one can verify the following assertions, which ensure the well-posedness of Problem 1 and yield a starting point for our error analysis.

Lemma 1

The quadrature rule (8) is exact for polynomials of degree \(k\le 2\) on triangles and for polynomials of degree \(k\le 1\) on squares. Moreover, the inexact scalar product \((\cdot ,\cdot )_h\) induces a norm \(\Vert \cdot \Vert _h\) on \(\mathscr {V}_h\), which is equivalent to the \(L^2\)-norm on \(\mathscr {V}_h\), and consequently Problem 1 has a unique solution.

As a second ingredient, let us recall some results about polynomial interpolation. We denote by \(\varPi _h : H^1(\mathscr {T}_h)^2 \rightarrow \mathscr {V}_h\) the projection defined element-wise by

$$\begin{aligned} (\varPi _h E)|_K {:}{=}\varPi _K E|_K \end{aligned}$$
(10)

where \(\varPi _K : H^1(K) \rightarrow {{\,\mathrm{\mathscr {N}}\,}}_0(K)\) is the standard interpolation operator for the lowest order Nedelec space \({{\,\mathrm{\mathscr {N}}\,}}(K)\) on both triangles and squares; see [1, 10] for details. We further denote by \(\pi _h^0 : L^2(\varOmega ) \rightarrow P_0(\mathscr {T}_h)\) the \(L^2\)-orthogonal projection onto piecewise constants; the same symbol is used for the projection of vector-valued functions.

Lemma 2

Let \(K\in \mathscr {T}_h\) and \(\varPi _h\) defined as in (10). Then

$$\begin{aligned} \Vert E-\varPi _h E\Vert _{L^2(K)}&\le Ch\Vert E\Vert _{H^1(K)}, \end{aligned}$$
(11)
$$\begin{aligned} \Vert {{\,\textrm{curl}\,}}(E-\varPi _h E)\Vert _{L^2(K)}&\le Ch\Vert {{\,\textrm{curl}\,}}E\Vert _{H^1(K)}, \end{aligned}$$
(12)
$$\begin{aligned} \Vert E-\pi _h^0E\Vert _{L^2(K)}&\le Ch\Vert E\Vert _{H^1(K)}, \end{aligned}$$
(13)

whenever E is regular enough, with a constant C independent of h.

Having introduced all the required tools, we can now state and prove our main result.

Theorem 1

Let E and \(E_h\) denote the solutions of (5) and (9) with initial values set by \(E_h(0)= \varPi _h E(0)\) and \(\partial _t E_h(0) = \varPi _h \partial _t E(0)\). Then

$$\begin{aligned} \Vert \partial _{t}(E - E_h)\Vert _{L^\infty (0,T;L^2(\varOmega ))} + \Vert {{\,\textrm{curl}\,}}(E - E_h)\Vert _{L^\infty (0,T;L^2(\varOmega ))} \le C(E,T) \, h \end{aligned}$$

with constant C depending on the norm of E but independent of the mesh size h.

Proof

Apart from some technical details, the analysis follows by standard arguments. For completeness and convenience of the reader, we present all the details.

Step 1. Error Splitting and Estimate for the Projection Error. We first split the discretization error into a projection error and a discrete error component via

$$\begin{aligned} E-E_h = (E-\varPi _h E) + (\varPi _h E - E_h) =: -\eta + \psi _h. \end{aligned}$$
(14)

By the estimates of Lemma 2, we immediately obtain

$$\begin{aligned} \Vert \partial _{t}\eta \Vert _{L^\infty (0,T;L^2(\varOmega ))} &+ \Vert {{\,\textrm{curl}\,}}\eta \Vert _{L^\infty (0,T;L^2(\varOmega ))} \\ &\le Ch\left( \Vert \partial _{t}E\Vert _{L^\infty (0,T;H^1(\mathscr {T}_h))} + \Vert {{\,\textrm{curl}\,}}E\Vert _{L^\infty (0,T;H^1(\mathscr {T}_h))}\right) , \end{aligned}$$

which already covers the first error component.

Step 2. Discrete Error Equation. By subtracting (8) from (5) with \(v=v_h\), we can see that the discrete error \(\psi _h\) satisfies the identity

$$\begin{aligned} (\partial _{tt}\psi _h(t),v_h)_h&+({{\,\textrm{curl}\,}}\psi _h(t),{{\,\textrm{curl}\,}}v_h) = \\ {} &(\partial _{tt}\eta (t),v_h)+({{\,\textrm{curl}\,}}\eta (t),{{\,\textrm{curl}\,}}v_h) + \sigma _h(\varPi _h\partial _{tt}u(t),v_h) \end{aligned}$$

for all \(v_h \in \mathscr {V}_h\) and \(0 \le t \le T\), with quadrature error

$$\begin{aligned} \sigma _h(E,v) = (E,v)_{h} - (E,v). \end{aligned}$$
(15)

We can further split \(\sigma _h(E,\phi ) = \sum \nolimits _{K\in \mathscr {T}_h}\sigma _K(E,\phi )\) into element contributions defined by \(\sigma _K(E,\phi ) = (E,\phi )_{h,K}-(E,\phi )_K\). Moreover, \(\psi _h(0)=\partial _{t} \psi _h(0)=0\), due to the choice of initial conditions for the discrete problem.

Step 3. Estimates for the Quadrature Error. To further proceed in our analysis, we now quantify the local quadrature error in more detail.

Lemma 3

Let \(E \in L^2(\varOmega )^2\) with \(E|_K \in H^1(K)^2\) for all \(K \in \mathscr {T}_h\). Then

$$\begin{aligned} |\sigma _K(\varPi _h E, \phi _h)|\le C h\Vert E\Vert _{H^1(K)}\Vert \phi _h\Vert _{L^2(K)} \end{aligned}$$

for all \(\phi _h\in \mathscr {V}_h\) and all \(K\in \mathscr {T}_h\) with constant C independent of the element K.

Proof

Using Lemma 1, we deduce that \((u_h^0,v_h)_K=(u_h^0,v_h)_{h,K}\) for all \(u_h^0 \in P_0(K)^2\) and \(v_h \in V(K)\). We can then estimate the quadrature error by

$$\begin{aligned} |\sigma _K(\varPi _h u, v_h)| &=|\sigma _K(\varPi _h u-\pi _h^0u,v_h)|\le c\Vert \varPi _h u-\pi _h^0u\Vert _{L^2(K)}\Vert v_h\Vert _{L^2(K)}\\ &\le c'h\Vert u\Vert _{H^1(K)}\Vert v_h\Vert _{L^2(K)}, \end{aligned}$$

where we used the Cauchy-Schwarz inequality and the norm equivalence of Lemma 1 and the approximation properties of the projections from Lemma 2.

Step 4. Estimate for the Discrete Error. Taking \(v_h=\partial _t \psi _h(t)\) as test function in the discrete error equation and integrating from 0 to t leads to

$$\begin{aligned} &\frac{1}{2}\left( \Vert \partial _{t}\psi _h(t)\Vert _h^2+\Vert {{\,\textrm{curl}\,}}\psi _h(t)\Vert _{L^2(\varOmega )}^2\right) \\ &\quad =\smallint _0^t(\partial _{tt}\eta (s),\partial _{t}\psi _h(s)) + ({{\,\textrm{curl}\,}}\eta (s),{{\,\textrm{curl}\,}}\partial _{t}\psi _h(s)) + \sigma _h(\varPi _h\partial _{tt}u(s),\partial _{t}\psi _h(s)) \, ds \nonumber . \end{aligned}$$
(16)

The three terms can now be estimated separately. Using Cauchy-Schwarz and Young inequalities, the first term may be bounded by

$$\begin{aligned} (i) \le ch^2\Vert \partial _{tt}E\Vert _{L^1(0,t,H^1(\mathscr {T}_h))}^2 + \tfrac{1}{4}\Vert \partial _{t}\psi _h\Vert ^2_{L^\infty (0,t,L^2(\varOmega ))}. \end{aligned}$$

For the second term, we utilize that

$$\begin{aligned} (ii) &= \smallint _0^t ({{\,\textrm{curl}\,}}(E - \varPi _h E), {{\,\textrm{curl}\,}}\partial _{t}\psi _h)) \, ds \\ &= ({{\,\textrm{curl}\,}}(E - \varPi _h E)(t), {{\,\textrm{curl}\,}}\psi _h(t)) - \smallint _0^t ({{\,\textrm{curl}\,}}(\partial _{t}E - \varPi _h \partial _{t}E), {{\,\textrm{curl}\,}}\psi _h) \, ds \\ & \le C h^2 \big (\Vert {{\,\textrm{curl}\,}}E\Vert _{L^\infty (0,t;H^1(\mathscr {T}_h))}^2 + \Vert {{\,\textrm{curl}\,}}\partial _{t}E\Vert _{L^1(0,t;L^2(\varOmega ))}^2 \big ) + \tfrac{1}{4} \Vert \psi _h\Vert _{L^\infty (0,t;L^2(\varOmega ))}^2. \end{aligned}$$

The third term can finally be estimated using Lemma 3 according to

$$\begin{aligned} (iii) &\le ch^2\Vert \partial _{tt}E\Vert _{L^1(0,t,H^1(\varOmega ))}^2 + \tfrac{1}{4}\Vert \partial _{t}\psi _h\Vert ^2_{L^\infty (0,t,L^2(\varOmega ))} \end{aligned}$$

Using these estimates in the inequality (16), absorbing all the terms with the test function into the left side, and taking the supremum over \(t\in [0,T]\), after applying the norm equivalence of Lemma 1 to some terms, then leads to the estimate

$$\begin{aligned} &\Vert \partial _{t}\psi _h\Vert _{L^\infty (0,T;L^2(\varOmega ))}^2 + \Vert {{\,\textrm{curl}\,}}\psi _h\Vert _{L^\infty (0,T;L^2(\varOmega ))}^2 \\ & \qquad \le C h^2\big (\Vert \partial _{tt}E\Vert _{L^1(0,T;H^1(\mathscr {T}_h))}^2 + \Vert \partial _{t}E\Vert _{L^1(0,T;H^1(\mathscr {T}_h))}^2 + \Vert {{\,\textrm{curl}\,}}E\Vert _{L^\infty (0,T;H^1(\mathscr {T}_h))}^2\big ) \end{aligned}$$

for the discrete error component; one may also take the square root in all terms.

Step 5. The proof of the theorem is completed by applying the triangle inequality to the error splitting in Step 1 and adding up the estimates for the projection error \(\eta \) and the discrete error component \(\psi _h\).

5 Implementation

For completeness of the presentation, let us briefly discuss the choice of basis functions for the local finite element spaces \({{\,\mathrm{\mathscr {N}}\,}}_0(K)\) and \({{\,\mathrm{\mathscr {N}}\,}}_0^+(K)\) which, together with the numerical quadrature leads to diagonal mass matrices.

Rectangle. On quadrilateral elements K, we choose the standard basis for the lowest order Nedelec space \({{\,\mathrm{\mathscr {N}}\,}}_0(K)=\text {span}\{\varPhi _{h,i}, \varPhi _{v,i}: i=1,\ldots ,2\}\); see [1, 10]. These functions have the following properties: The function \(\varPhi _{h,i}\) associated to a horizontal edge \(e_{h,i}\) vanishes identically on the opposite horizontal edge, and \(\varPhi _{v,j}\) associated to for the vertical edge \(e_{v,j}\) vanishes on the opposite vertical edge. Hence the local mass matrix produced by the quadrature rule \((u,v)_{K,h}\) for every rectangle is diagonal.

Triangle. Let \(\{\lambda _i\}\) be the barycentric coordinates of the element K. For every edge \(e_k=e_{ij}\) pointing from vertex i to j, and thus opposite to k, we define the two basis functions

$$\begin{aligned} \varPhi _{ij}^{B} &= \lambda _i \lambda _j \nabla \lambda _k \qquad \text {and} \qquad \\ \varPhi _{ij} &= \lambda _i \nabla \lambda _j - \lambda _j \nabla \lambda _i + \alpha _{ij} \varPhi _{ij}^{B} + \beta _{ij} \varPhi _{jk}^{B} + \gamma _{ij} \varPhi _{ki}^{B}. \end{aligned}$$

Then \({{\,\mathrm{\mathscr {N}}\,}}_0^+(K)={\text {span}}\{\varPhi _{12},\varPhi _{23},\varPhi _{31},\varPhi _{12}^{B},\varPhi _{23}^{B},\varPhi _{31}^{B}\}\). The bubble functions \(\varPhi _{ij}^{B}\) have vanishing tangential components on the edge are \(e_k\), and they vanish identically on the two remaining edges \(e_i\), \(e_j\). The functions \(\varPhi _{ij}\) are modified Nedelec basis functions. They have vanishing tangential components on the two edges \(e_i\), \(e_j\), and by appropriate choice of the parameters \(\alpha _{ij}\), \(\beta _{ij}\), \(\gamma _{ij}\), their normal components on all edge midpoints \(m_{K,i}\) can be made zero. As a consequence, the local mass matrix produced by the scalar product \((u,v)_{K,h}\) for the triangle becomes diagonal.

Summary. The global mass matrix is obtained by assembling the local mass matrices, which are diagonal, and hence has inherits this property.

6 Numerical Illustration

We consider the computational domain \(\varOmega = \varOmega _1\cup \varOmega _2\) where \(\varOmega _1 = (0,2)\times (-1,1)\) and \(\varOmega _2 = \big ((2,4)\times (-1,1))\setminus B_{0.3}(3,0)\), where \(B_{r}(x,y)\) denotes the ball with radius r around midpoint (xy). The two subdomains are meshed by rectangles and triangles, respectively. For our test problem, we consider the wave Eq. (3). The boundary \(\partial \varOmega \) is split into several parts and as boundary conditions, we impose

$$\begin{aligned} n \times E &= \sin (10\cdot t) \cdot e^{-10y^2}, \qquad &\,& \text {on } \partial \varOmega _{\text {left}}, \\ n \times E &= 0, \qquad &\,& \text {on } \partial \varOmega _{\text {ball}},\\ n \times {{\,\textrm{curl}\,}}E &= 0, \qquad &\,& \text {else.} \end{aligned}$$

The initial conditions are chosen as \(E(0)=\partial _{t}E(0)=0\). This corresponds to a pulse entering at the left boundary, propagating through the domain, and getting reflected at the walls of the box and the circular inclusion. Some snapshots of the solution are depicted in Fig. 2. Let us remark that no reflections are observed at the interface between the two meshes. In our numerical tests, we observe linear convergence of the error in space. This coincides with the theoretical predictions of Theorem 1, and also demonstrates that the error estimates are sharp. Note that second-order convergence is in general lost for Yee-like approximations on unstructured grids; also see [11].

Fig. 2.
figure 2

The first \(E_1\) component of the solution \(E=(E_1,E_2)\) at time steps \(t=2.3\) and \(t=5\) showing the scattering at the sphere.