1 Introduction

Maxwell’s equations consist of two vector evolution equations, together with two scalar constraint equations, \( {\text {div}} B = 0 \) and \( {\text {div}} {D} = \rho \), where B is magnetic flux density, D is electric flux density, and \(\rho \) is charge density. These constraints are automatically preserved by the evolution, so given initial conditions satisfying the constraints, one can simply evolve forward in time without needing to “enforce” the constraints in any way.

However, if one applies a finite element method in space, then the semidiscretized evolution equations no longer necessarily preserve these constraints, at least not strongly. Nédélec [39] showed that, if one uses curl-conforming edge elements for the electric field E and divergence-conforming face elements for B, then the semidiscretized equations preserve \( {\text {div}} B = 0 \) strongly. On the other hand, \( {\text {div}} {D} = \rho \) holds only in the Galerkin sense (i.e., when both sides are integrated against certain continuous, piecewise polynomial test functions). Recent constraint-preserving methods due to Campos Pinto and Sonnendrücker [17] and Hu et al. [29] also preserve \( {\text {div}} B = 0 \) strongly, but \( {\text {div}} {D} = \rho \) only in a weaker sense.

Christiansen and Winther [20] observe that strong preservation of both divergence constraints “appears to be necessary for many applications in electromagnetics,” and Houston et al. [28] call this “one of the main difficulties in the numerical solution of Maxwell’s equations.” For this reason, alternative approaches have been developed that enforce the constraints strongly—for instance, using Lagrange multipliers [4, 18]—instead of attempting to preserve them automatically but weakly, as Nédélec’s method does. In cases where \( \rho = 0 \), another idea is to use divergence-free elements to construct nonconforming methods [9, 11] or discontinuous Galerkin methods [10, 23, 28].

In this paper, we attack the problem of constraint preservation from a different perspective. We perform domain decomposition of the Lagrangian (i.e., primal) variational principle for Maxwell’s equations, in terms of the vector potential A and scalar potential \(\varphi \), using Lagrange multipliers \( {\widehat{H}} \) and \( \widehat{ {D} } \) to enforce inter-element continuity and boundary conditions. These Lagrange multipliers are shown to correspond to boundary traces of the magnetic field H and electric flux density D. After using gauge symmetry to fix \( \varphi = 0 \), we show that the evolution of \( ( A, {\widehat{H}} ) \) automatically preserves the constraints \( {\text {div}} B = 0 \) and \( {\text {div}} \widehat{ {D} } = \rho \). Finally, we semidiscretize this domain-decomposed variational principle, obtaining primal hybrid finite element methods that preserve this formulation of the constraints in a strong sense. As a special case, we give a hybridized formulation of Nédélec’s method, implying that it preserves the constraints in a stronger sense than previously recognized.

To place this in the context of previous work, we note that the general idea of using Lagrange multipliers to weakly enforce inter-element continuity and boundary conditions on \( H ( {\text {curl}} ) \) spaces is not itself new. Various alternative spaces of Lagrange multipliers have been proposed in the literature on mortar methods for Maxwell’s equations [5, 27, 30, 42] and hybrid methods for the Stokes equations [21, 22], for example. In contrast to this previous work, one of the key distinctions here is that we take \( {\widehat{H}} \) and \( \widehat{ {D} } \) to themselves be \( H ({\text {curl}}) \)- and \( H ({\text {div}})\)-conforming, respectively. This makes it possible to formulate the charge conservation constraint for these methods in a strong sense.

The paper is organized as follows:

  • In Sect. 2, we review Maxwell’s equations, the Lagrangian variational principle, and semidiscretization using edge elements.

  • In Sect. 3, we domain decompose the Lagrangian variational principle, relate solutions to the classical (non-domain-decomposed) formulation of Maxwell’s equations, and study the domain-decomposed version of the constraints and their preservation.

  • In Sect. 4, we consider primal hybrid finite element methods for semidiscretizing the domain-decomposed evolution equations, showing that constraints are preserved in a strong sense.

  • Finally, in Sect. 5 we conduct numerical experiments demonstrating the behavior of the hybridized Nédélec method. In addition to the constraints being preserved to machine precision, these results illustrate a superconvergence phenomenon in 2-D for the post-processed magnetic field \( {\widehat{H}} _h \), similar to that observed for other hybridized mixed methods (cf. Arnold and Brezzi [2], Brezzi et al. [12]).

2 Review of Maxwell’s Equations

2.1 Maxwell’s Equations

We begin by reviewing the classical formulation of Maxwell’s equations, first in terms of the electric and magnetic fields and flux densities, and then in terms of the vector and scalar potentials. We postpone the discussion of regularity until the introduction of the weak formulation, in Sect. 2.2; for the moment, everything may be assumed to be smooth.

2.1.1 Standard Formulation

In their most familiar form, Maxwell’s equations consist of the vector evolution equations,

$$\begin{aligned} {\dot{B}}&= - {\text {curl}} E, \end{aligned}$$
(1a)
$$\begin{aligned} \dot{ {D} } + J&= {\text {curl}} H , \end{aligned}$$
(1b)

together with the scalar constraint equations,

$$\begin{aligned} {\text {div}} B&= 0, \end{aligned}$$
(2a)
$$\begin{aligned} {\text {div}} {D}&= \rho . \end{aligned}$$
(2b)

Here, E and H denote the electric field and magnetic field, \( {D} = \varepsilon E \) and \( B = \mu H \) denote the electric flux density and magnetic flux density, \(\varepsilon \) and \(\mu \) are the electric permittivity and magnetic permeability tensors, and J and \(\rho \) are current density and charge density, respectively. We use the “dot” notation \( {\dot{u}} :=\partial _t u \) to denote partial differentiation with respect to time.

The evolution equations (1) automatically preserve the constraints (2). Indeed, taking the divergence of (1a) implies \( {\text {div}} {\dot{B}} = 0 \), so (2a) is preserved. Similarly, taking the divergence of (1b) implies \( {\text {div}} \dot{ {D} } + {\text {div}} J = 0 \), so (2b) is preserved if and only if J and \(\rho \) satisfy \( {\dot{\rho }} + {\text {div}} J = 0 \), which is the law of conservation of charge. We refer to (2b) as the charge conservation constraint, since it is equivalent to this condition.

2.1.2 Formulation in Terms of Potentials

Alternatively, Maxwell’s equations may be expressed in terms of a vector field A, called the vector potential, and a scalar field \(\varphi \), called the scalar potential. Given A and \(\varphi \), we define the electric field and magnetic flux density by

$$\begin{aligned} E :=- ( {\dot{A}} + {\text {grad}} \varphi ) , \quad B :={\text {curl}} A . \end{aligned}$$

Note that (1a) and (2a) are automatically satisfied, so we may restrict our attention entirely to the single evolution equation (1b), which we have already seen preserves (2b).

However, Maxwell’s equations do not uniquely determine the evolution of \( ( A, \varphi ) \). Observe that if \( \xi \) is any time-dependent scalar field, then the transformation \( ( A, \varphi ) \mapsto ( A + {\text {grad}} \xi , \varphi - {\dot{\xi }} ) \) leaves E, BDH unchanged. Such transformations are called gauge transformations, and the invariance of Maxwell’s equations under gauge transformations is called gauge symmetry. In particular, any solution \( ( A, \varphi ) \) may be transformed into one of the forms \( ( A + {\text {grad}} \xi , 0 ) \) by taking \(\xi \) to be a solution of \( {\dot{\xi }} = \varphi \). Therefore, we may restrict our attention to solutions with \( \varphi = 0 \).

Remark 1

This procedure of restricting to particular solutions, which are related to a general solution by some gauge transformation, is called gauge fixing. The choice \( \varphi = 0 \), called temporal gauge, is the most convenient for our purposes, but there are other choices as well. Note that there is still some remaining gauge symmetry, even after performing temporal gauge fixing: We may transform \( A \mapsto A + {\text {grad}} \xi \) for any \(\xi \) constant in time.

After temporal gauge fixing, we can write (1b) as either a first-order system in A, D,

$$\begin{aligned} {\dot{A}} = - \varepsilon ^{-1} {D} , \quad \dot{ {D} } + J = {\text {curl}} ( \mu ^{-1} {\text {curl}} A ), \end{aligned}$$

or as a second-order equation in A alone,

$$\begin{aligned} - \partial _t ( \varepsilon {\dot{A}} ) + J = {\text {curl}} ( \mu ^{-1} {\text {curl}} A ). \end{aligned}$$

In the special case where \(\varepsilon \) and \(\mu \) are simply positive constants with \( \varepsilon \mu = 1 \) (as in vacuum, with units chosen so that the speed of light is 1) and \( J = 0 \), the latter equation just becomes

$$\begin{aligned} {\ddot{A}} + {\text {curl}} {\text {curl}} A = 0. \end{aligned}$$

Taking the Fourier transform with respect to time (the so-called frequency domain or time-harmonic approach), this latter equation transforms into the eigenvalue problem for the \( {\text {curl}}\)-\({\text {curl}} \) operator.

2.2 Weak Formulation

We next discuss the weak formulation of Maxwell’s equations, first using a Lagrangian variational principle in terms of the potentials A and \(\varphi \), and then fixing the temporal gauge \( \varphi = 0 \) to arrive at a weak formulation in terms of A alone.

2.2.1 Function Spaces and Regularity

Let \( \Omega \subset {\mathbb {R}}^3 \) be a bounded Lipschitz domain, and define the function spaces

$$\begin{aligned} H ^1 (\Omega )&:=\bigl \{ u \in L ^2 (\Omega ) : {\text {grad}} u \in L ^2 ( \Omega , {\mathbb {R}}^3 ) \bigr \} ,\\ H ( {\text {curl}} ; \Omega )&:=\bigl \{ u \in L ^2 ( \Omega , {\mathbb {R}}^3 ) : {\text {curl}} u \in L ^2 ( \Omega , {\mathbb {R}}^3 ) \bigr \} ,\\ H ( {\text {div}} ; \Omega )&:=\bigl \{ u \in L ^2 ( \Omega ; {\mathbb {R}}^3 ) : {\text {div}} u \in L ^2 (\Omega ) \bigr \} . \end{aligned}$$

We also define the following subspaces, with boundary conditions imposed:

$$\begin{aligned} \mathring{ H } ^1 (\Omega )&:=\bigl \{ u \in H ^1 (\Omega ) : u |_{ \partial \Omega } = 0 \bigr \} ,\\ \mathring{ H } ( {\text {curl}} ; \Omega )&:=\bigl \{ u \in H ( {\text {curl}} ; \Omega ) : u \times {\mathbf {n}} |_{ \partial \Omega } = 0 \bigr \} ,\\ \mathring{ H } ( {\text {div}} ; \Omega )&:=\bigl \{ u \in H ( {\text {div}}; \Omega ) : u \cdot {\mathbf {n}} |_{ \partial \Omega } = 0 \bigr \} . \end{aligned}$$

Here, \( {\mathbf {n}} |_{ \partial \Omega } \) denotes the outer unit normal to \( \partial \Omega \), and restrictions to \( \partial \Omega \) are interpreted in the trace sense.

Let \( A :t \mapsto A (t) \) be a \( C ^1 \) curve in \( \mathring{ H } ( {\text {curl}} ; \Omega ) \) and \( \varphi :t \mapsto \varphi (t) \) be a \( C ^0 \) curve in \( \mathring{ H } ^1 (\Omega ) \). It follows that E is a \( C ^0 \) curve in \( \mathring{ H } ( {\text {curl}} ; \Omega ) \), that B is a \( C ^1 \) curve in \( \mathring{ H } ( {\text {div}}; \Omega ) \), and that (1a) and (2a) hold strongly in \( L ^2 \). We also assume that both \( \varepsilon = \varepsilon _{ i j } ( x, t ) \) and \( \mu = \mu _{ i j } ( x, t ) \) are \( L ^\infty \), symmetric, and uniformly elliptic. In particular, this implies that D and H are both \( C ^0 \) curves in \( L ^2 ( \Omega , {\mathbb {R}}^3 ) \). Henceforth, we restrict our attention to \( ( A, \varphi ) \) such that D is in fact a \( C ^1 \) curve in \( L ^2 ( \Omega , {\mathbb {R}}^3 ) \). Finally, let the current density J be a given \( C ^0 \) curve in \( H ( {\text {div}} ; \Omega ) \) and the charge density \(\rho \) be a given \( C ^1 \) curve in \( L ^2 (\Omega ) \), satisfying the charge conservation condition \( {\dot{\rho }} + {\text {div}} J = 0 \).

2.2.2 The Lagrangian and Euler–Lagrange Equations

For \( ( A, \varphi ) \) satisfying the regularity assumptions in the previous paragraph, define the Lagrangian

$$\begin{aligned} L ( A, \varphi , {\dot{A}} , {\dot{\varphi }} ) :=\int _\Omega \biggl ( \frac{1}{2} E \cdot {D} - \frac{1}{2} B \cdot H + A \cdot J - \varphi \rho \biggr ) . \end{aligned}$$

The Euler–Lagrange equations are

$$\begin{aligned} \int _\Omega \bigl ( A ^\prime \cdot ( \dot{ {D} } + J ) - {\text {curl}} A ^\prime \cdot H \bigr )&= 0 ,&\quad \forall A ^\prime&\in \mathring{ H } ( {\text {curl}} ; \Omega ) ,\end{aligned}$$
(3a)
$$\begin{aligned} \int _\Omega ( {\text {grad}} \varphi ^\prime \cdot {D} + \varphi ^\prime \rho )&= 0,&\forall \varphi ^\prime&\in \mathring{ H } ^1 (\Omega ) , \end{aligned}$$
(3b)

which are weak expressions of (1b) and (2b), respectively.

These Euler–Lagrange equations imply that solutions have additional regularity properties. Since \( {\text {curl}} H = \dot{ {D} } + J \) is \( C ^0 \) in \( L ^2 \), we have that H is \( C ^0 \) in \( H ( {\text {curl}} ; \Omega ) \). Likewise, since \( {\text {div}} {D} = \rho \) is \( C ^1 \) in \( L ^2 \), we have that D is \( C ^1 \) in \( H ( {\text {div}}; \Omega ) \). Hence, solutions to this weak problem are in fact strong solutions of Maxwell’s equations.

Remark 2

When \(\varepsilon \) and \(\mu \) are constant in time, the electric and magnetic fields have precisely the same regularity assumed by Monk [37, eqs. (7)–(8)]; namely, E is \( C ^1 \) in \( L ^2 ( \Omega , {\mathbb {R}}^3 ) \) and \( C ^0 \) in \( \mathring{ H } ( {\text {curl}} ; \Omega ) \), while H is \( C ^1 \) in \( L ^2 ( \Omega , {\mathbb {R}}^3 ) \) and \( C ^0 \) in \( H ( {\text {curl}}; \Omega ) \).

As in Sect. 2.1, this formulation is symmetric with respect to gauge transformations \( ( A, \varphi ) \mapsto ( A + {\text {grad}} \xi , \varphi - {\dot{\xi }} ) \), where \(\xi \) is now an arbitrary \( C ^1 \) curve in \( \mathring{ H } ^1 (\Omega ) \). Fixing the temporal gauge \( \varphi = 0 \), the Lagrangian becomes

$$\begin{aligned} L ( A, {\dot{A}} ) = \int _\Omega \biggl ( \frac{1}{2} E \cdot {D} - \frac{1}{2} B \cdot H + A \cdot J \biggr ), \end{aligned}$$

and the Euler–Lagrange equations are just (3a). This again implies that H is \( C ^0 \) in \( H ( {\text {curl}}; \Omega ) \), so (1b) holds strongly. By the same argument as in Sect. 2.1, this automatically preserves the charge conservation constraint.

Remark 3

Preservation of the charge conservation constraint may also be seen as a consequence of the remaining gauge symmetry \( A \mapsto A + {\text {grad}} \xi \), mentioned in Remark 1, where \( \xi \in \mathring{ H } ^1 (\Omega ) \) is constant in time. This is a particular instance of Noether’s theorem, which relates symmetries to conservation laws. See Marsden and Ratiu [34, Section 1.6] for an account of the \( J = 0 \) case, as well as the discussion in Christiansen and Winther [20].

2.3 Galerkin Semidiscretization Using Nédélec Elements

The use of finite elements in computational electromagnetics is a broad topic with a long history, and we do not attempt to give a full account here. We refer the reader to the texts by Monk [38] and Jin [31], as well as the excellent survey article by Hiptmair [26], which relates these methods to the more recent theory of finite element spaces of differential forms. In this section, we briefly review the semidiscretization of Maxwell’s equations using the elements of Nédélec [39, 40], an approach that was subsequently analyzed in a series of papers by Monk [35,36,37].

Galerkin semidiscretization of the variational problem (3a) restricts the trial and test functions to some finite-dimensional subspace \( V _h ^1 \subset \mathring{ H } ( {\text {curl}} ; \Omega ) \), resulting in a finite-dimensional system of ODEs. That is, we seek a \( C ^1 \) curve \( A _h :t \mapsto A _h (t) \in V _h ^1 \) such that

$$\begin{aligned} \int _\Omega \bigl ( A _h ^\prime \cdot ( \dot{ {D} } _h + J ) - {\text {curl}} A _h ^\prime \cdot H _h \bigr ) = 0, \quad \forall A _h ^\prime \in V _h ^1 , \end{aligned}$$
(4)

where \( E _h :=- {\dot{A}} _h, B _h :={\text {curl}} A _h , {D} _h :=\varepsilon E _h \), and \( H _h :=\mu ^{-1} B _h \). The discrete versions of (1a) and (2a),

$$\begin{aligned} {\dot{B}} _h = - {\text {curl}} E _h , \quad {\text {div}} B _h = 0 , \end{aligned}$$

follow immediately. In fact, both hold strongly in \( L ^2 \), by the same argument as in Sect. 2.2.1, since \( E _h \in V _h ^1 \subset \mathring{ H } ( {\text {curl}}; \Omega ) \) and \( B _h \in {\text {curl}} V _h ^1 \subset \mathring{ H } ( {\text {div}} ; \Omega ) \). On the other hand, we cannot conclude that \( {D} _h \) is in \( H ( {\text {div}}; \Omega ) \), nor that \( H _h \) is in \( H ( {\text {curl}} ; \Omega ) \), since (4) only holds for test functions in \( V _h ^1 \) and not all of \( \mathring{ H } ( {\text {curl}} ; \Omega ) \).

Consequently, the charge conservation constraint (2b) is only preserved in the following, much weaker sense. Let \( V _h ^0 \subset \mathring{ H } ^1 (\Omega ) \) be a finite-dimensional subspace such that \( {\text {grad}} V _h ^0 \subset V _h ^1 \). Then, for all \( \xi _h \in V _h ^0 \), taking \( A ^\prime _h = {\text {grad}} \xi _h \) in (4) and applying \( {\dot{\rho }} + {\text {div}} J = 0 \) give

$$\begin{aligned} \int _\Omega ( {\text {grad}} \xi _h \cdot \dot{ {D} } _h + \xi _h {\dot{\rho }} ) = 0 . \end{aligned}$$

Hence, if the initial conditions satisfy \( \int _\Omega ( {\text {grad}} \xi _h \cdot {D} _h + \xi _h \rho ) = 0 \), for all \( \xi _h \in V _h ^0 \), then this is preserved by the flow of (4).

In particular, suppose now that \( \Omega \) is polyhedral, and that \( {{\mathscr {T}}} _h \) is a triangulation of \( \Omega \) by 3-simplices (i.e., tetrahedra) \( K \in {{\mathscr {T}}} _h \). We may take \( V _h ^0 \) to be the space of continuous degree-r piecewise polynomials on \( {{\mathscr {T}}} _h \) vanishing on \( \partial \Omega \), corresponding to standard Lagrange finite elements. For \( V _h ^1 \), we may take either degree-r [39] edge elements of the first kind [39] or degree-\( ( r -1 ) \) [40] edge elements of the second kind [40] with vanishing degrees of freedom on \( \partial \Omega \). These are spaces of piecewise polynomial vector fields in \( {\mathbb {R}}^3 \) with tangential (but not necessarily normal) continuity between neighboring simplices. These choices ensure that \( {\text {grad}} V _h ^0 \subset V _h ^1 \), so the above weak charge conservation argument holds.

Note, however, that \( \int _\Omega ( {\text {grad}} \xi _h \cdot {D} _h + \xi _h \rho ) = 0 \) only says that \( {\text {div}} {D} _h = \rho \) holds in an “averaged” sense, since (unlike in the infinite-dimensional case) nonzero \( \xi _h \in V _h ^0 \) cannot be taken to have arbitrarily small support. We cannot even conclude that the constraint holds in the sense that \( \int _{ \partial K } {D} _h \cdot {\mathbf {n}} = \int _K \rho \), since the indicator function \( {\mathbf {1}} _K \) is discontinuous and therefore not an admissible test function. (Christiansen and Winther [20] give a compactness argument for why this weak form of the constraint “might be just as good” as the strong form, in the limit as \( h \rightarrow 0 \); see also Christiansen [19].) This motivates our proposed hybrid approach, based on domain decomposition, for which piecewise constants are admissible test functions.

Remark 4

The above method describes the evolution of \( A _h \in V _h ^1 \). Equivalently, one may evolve \( E _h \in V _h ^1 \) and \( B _h \in {\text {curl}} V _h ^1 \subset V _h ^2 \subset \mathring{ H } ( {\text {div}}; \Omega ) \) by augmenting (4) with \( {\dot{B}} _h = - {\text {curl}} E _h \). This is the original approach described by Nédélec [39], where \( V _h ^2 \) is given by face elements on \( {{\mathscr {T}}} _h \).

3 Domain Decomposition Preliminaries

In this section, we introduce an alternative variational formulation for Maxwell’s equations, based on domain decomposition. Specifically, we decompose the problem on \( \Omega \) into a collection of problems on \( K \in {{\mathscr {T}}} _h \), weakly enforcing internal continuity and external boundary conditions using Lagrange multipliers. This is similar in spirit to the standard approach to domain decomposition for Poisson’s equation, cf. Brezzi and Fortin [13]. We show that the Lagrange multipliers enforcing these conditions on A and \(\varphi \) correspond to the traces of H and D, respectively, and we show that the latter satisfies an appropriate version of the charge conservation constraint.

3.1 Function Spaces

We begin by introducing the following discontinuous function spaces, which are larger than the spaces used in the previous variational formulation:

$$\begin{aligned} H ^1 ( {{\mathscr {T}}} _h )&:=\bigl \{ u \in L ^2 (\Omega ) : u |_K \in H ^1 (K), \text { for all } K \in {{\mathscr {T}}} _h \bigr \} ,\\ H ( {\text {curl}}; {{\mathscr {T}}} _h )&:=\bigl \{ u \in L ^2 (\Omega , {\mathbb {R}}^3 ) : u |_K \in H ({\text {curl}}; K), \text { for all } K \in {{\mathscr {T}}} _h \bigr \} ,\\ H ( {\text {div}} ; {{\mathscr {T}}} _h )&:=\bigl \{ u \in L ^2 (\Omega , {\mathbb {R}}^3 ) : u |_K \in H ({\text {div}}; K), \text { for all } K \in {{\mathscr {T}}} _h \bigr \} . \end{aligned}$$

Brezzi and Fortin [13, Proposition III.1.1] show that

$$\begin{aligned} \mathring{ H } ^1 (\Omega ) = \bigl \{ u \in H ^1 ( {{\mathscr {T}}} _h ) : \textstyle \sum _{ K \in {{\mathscr {T}}} _h } \int _{\partial K} u \lambda \cdot {\mathbf {n}} = 0 , \text { for all } \lambda \in H ( {\text {div}}; \Omega ) \bigr \} . \end{aligned}$$

That is, \( \mathring{ H } ^1 ( \Omega ) \) is the subspace of \( H ^1 ( {{\mathscr {T}}} _h ) \) where internal continuity and external boundary conditions are enforced by Lagrange multipliers \( \lambda \in H ( {\text {div}} ; \Omega ) \). Likewise, Brezzi and Fortin [13, Proposition III.1.2] show that

$$\begin{aligned} H ( {\text {div}} ; \Omega ) = \bigl \{ u \in H ( {\text {div}}; {{\mathscr {T}}} _h ) : \textstyle \sum _{ K \in {{\mathscr {T}}} _h } \int _{\partial K} u \lambda \cdot {\mathbf {n}} = 0 , \text { for all } \lambda \in \mathring{ H } ^1 ( \Omega ) \bigr \} . \end{aligned}$$

Using a similar argument, we now prove the corresponding result for the \( H ( {\text {curl}} ) \) spaces. For smooth vector fields u, \(\lambda \), we have the integration by parts formula

$$\begin{aligned} \int _{ \partial K } ( u \times \lambda ) \cdot {\mathbf {n}} = \int _K ( {\text {curl}} u \cdot \lambda - u \cdot {\text {curl}} \lambda ) . \end{aligned}$$

Although the right-hand side is defined even if we only have \( u , \lambda \in H ( {\text {curl}}; K ) \), their traces are generally only in \( H ^{ - 1/2 } \) on \( \partial K \), so the integral on the left-hand side must be replaced by a dual pairing \( \langle u , \lambda \rangle _{ \partial K } \), cf. Buffa and Ciarlet [14, 15] and Buffa et al. [16]. We abuse notation by writing \( \int _{ \partial K } (u \times \lambda ) \cdot {\mathbf {n}} :=\langle u , \lambda \rangle _{ \partial K } \) for this dual pairing, even when it is not strictly an integral, and likewise for the dual pairing of \( H ( {\text {curl}}; \Omega ) \) vector fields on \( \partial \Omega \).

Proposition 1

\( \mathring{ H } ( {\text {curl}} ; \Omega ) = \bigl \{ u \in H ( {\text {curl}}; {{\mathscr {T}}} _h ) : \sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } (u \times \lambda ) \cdot {\mathbf {n}} = 0 , \text { for all } \lambda \in H ( {\text {curl}}; \Omega ) \bigr \} \).

Proof

If \( u \in \mathring{ H } ( {\text {curl}} ; \Omega ) \subset H ( {\text {curl}}; {{\mathscr {T}}} _h ) \), then for any \( \lambda \in H ( {\text {curl}} ; \Omega ) \), we have

$$\begin{aligned} \sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } ( u \times \lambda ) \cdot {\mathbf {n}}&= \sum _{ K \in {{\mathscr {T}}} _h } \int _K ( {\text {curl}} u \cdot \lambda - u \cdot {\text {curl}} \lambda ) \\&= \int _\Omega ( {\text {curl}} u \cdot \lambda - u \cdot {\text {curl}} \lambda ) \\&= \int _{ \partial \Omega } ( u \times \lambda ) \cdot {\mathbf {n}}\\&= 0, \end{aligned}$$

so the forward inclusion \( ( \subset ) \) holds. To get the reverse inclusion \( ( \supset ) \), suppose that \( u \in H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \) satisfies the above condition, and let \( \lambda \in C ^\infty _c ( \Omega , {\mathbb {R}}^3 ) \). Then, integrating by parts, we have

$$\begin{aligned} \biggl |\int _\Omega u \cdot {\text {curl}} \lambda \biggr |&= \Biggl |\sum _{ K \in {{\mathscr {T}}} _h } \int _K {\text {curl}} u \cdot \lambda - \sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } (u \times \lambda ) \cdot {\mathbf {n}} \Biggr |\\&= \Biggl |\sum _{ K \in {{\mathscr {T}}} _h } \int _K {\text {curl}} u \cdot \lambda \Biggr |\\&\le \Biggl ( \sum _{ K \in {{\mathscr {T}}} _h } \Vert {\text {curl}} u \Vert ^2 _{ L ^2 ( K , {\mathbb {R}}^3 ) } \Biggr ) ^{ 1/2 } \Vert \lambda \Vert _{ L ^2 ( \Omega , {\mathbb {R}}^3 ) }, \end{aligned}$$

where the last line uses the triangle and Cauchy–Schwarz inequalities. It follows that \( {\text {curl}} u \in L ^2 ( \Omega , {\mathbb {R}}^3 ) \), so \( u \in H ( {\text {curl}} ; \Omega ) \). This implies that \( \int _{\partial \Omega } ( u \times \lambda ) \cdot {\mathbf {n}} = \sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } (u \times \lambda ) \cdot {\mathbf {n}} = 0 \) for all \( \lambda \in H ( {\text {curl}} ; \Omega ) \). Hence, \( u \times {\mathbf {n}} |_{ \partial \Omega } = 0 \) in the trace sense, which completes the proof. \(\square \)

Remark 5

A variant of this result is stated in Boffi et al. [8, Proposition 2.1.3], where \( \lambda \) is taken to be in \( H ^1 ( \Omega , {\mathbb {R}}^3 ) \) rather than \( H ( {\text {curl}}; \Omega ) \). This avoids the technicality of using the dual pairing instead of an integral, but the version given here is more natural for the purpose of the hybrid methods discussed in Sect. 4.

3.2 Domain Decomposition of the Lagrangian Variational Principle

We now introduce a new Lagrangian for Maxwell’s equations, which allows the potentials to live in the discontinuous function spaces defined in the previous section, enforcing continuity and boundary conditions using Lagrange multipliers.

Let \( A (t) \in H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \) and \( \varphi (t) \in H ^1 ( {{\mathscr {T}}} _h ) \), and introduce the Lagrange multipliers \( \widehat{ {H} } (t) \in H ( {\text {curl}} ; \Omega ) \) and \( \widehat{ {D} } (t) \in H ( {\text {div}}; \Omega ) \). We adopt the notation, often seen in the literature on discontinuous Galerkin and hybrid methods, of placing hats over variables that act like weak traces/fluxes. As before, suppose that \(t \mapsto A (t) \) is \( C ^1 \) and that \( t \mapsto \varphi (t) \) is \( C ^0 \), such that \( t \mapsto {D} (t) \in L ^2 ( \Omega , {\mathbb {R}}^3 ) \) is \( C ^1 \). Furthermore, suppose that \( t \mapsto {\widehat{H}} (t) \) and \( t \mapsto \widehat{ {D} } (t) \) are both \( C ^0 \). Define the Lagrangian

$$\begin{aligned} L ( A, \varphi , {\widehat{H}}, \widehat{ {D} } , {\dot{A}} , {\dot{\varphi }}, \dot{ {\widehat{H}} }, \dot{ \widehat{ {D} } } )= & {} \sum _{ K \in {{\mathscr {T}}} _h } \Biggl [ \int _K \biggl ( \frac{1}{2} E \cdot {D} - \frac{1}{2} B \cdot H + A \cdot J - \varphi \rho \biggr ) \\&\quad + \int _{ \partial K } ( A \times {\widehat{H}} + \varphi \widehat{ {D} } ) \cdot {\mathbf {n}} \Biggr ]. \end{aligned}$$

The Euler–Lagrange equations are then

$$\begin{aligned} \int _K \bigl ( A ^\prime \cdot ( \dot{ {D} } + J ) \!-\! {\text {curl}} A ^\prime \cdot H \bigr ) \!+\! \int _{ \partial K } ( A ^\prime \times {\widehat{H}} ) \cdot {\mathbf {n}}&= 0, \quad \forall A ^\prime \in H ( {\text {curl}} ; K ) , \end{aligned}$$
(5a)
$$\begin{aligned} \int _K ( {\text {grad}} \varphi ^\prime \cdot {D} + \varphi ^\prime \rho ) - \int _{ \partial K } \varphi ^\prime \widehat{ {D} } \cdot {\mathbf {n}}&= 0, \quad \forall \varphi ^\prime \in H ^1 (K) , \end{aligned}$$
(5b)
$$\begin{aligned} \sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } ( A \times {\widehat{H}} ^\prime ) \cdot {\mathbf {n}}&= 0 , \quad \forall {\widehat{H}} ^\prime \in H ( {\text {curl}}; \Omega ) , \end{aligned}$$
(5c)
$$\begin{aligned} \sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } \varphi \widehat{ {D} } ^\prime \cdot {\mathbf {n}}&= 0, \quad \forall \widehat{ {D} } ^\prime \in H ( {\text {div}}; \Omega ) , \end{aligned}$$
(5d)

where (5a) and (5b) hold for all \(K \in {{\mathscr {T}}} _h \). We now relate this to the classical variational form of Maxwell’s equations, stated in (3).

Proposition 2

Suppose that \(t \mapsto A (t) \in H ( {\text {curl}}; {{\mathscr {T}}} _h ) \) is \( C ^1 \) and \( t \mapsto \varphi (t) \in H ^1 ( {{\mathscr {T}}} _h ) \) is \( C ^0 \), such that \( t \mapsto {D} (t) \in L ^2 ( \Omega , {\mathbb {R}}^3 ) \) is \( C ^1 \). Furthermore, suppose that \( t \mapsto {\widehat{H}} (t) \in H ( {\text {curl}}; \Omega ) \) and \( t \mapsto \widehat{ {D} } (t) \in H ( {\text {div}}; \Omega ) \) are both \( C ^0 \). Then \( ( A, \varphi , \widehat{ {H} } , \widehat{ {D} } ) \) is a solution to (5) if and only if \( ( A, \varphi ) \) is a solution to (3) with \( {\widehat{H}} \times {\mathbf {n}} |_{ \partial K } = H \times {\mathbf {n}} |_{ \partial K } \) and \( \widehat{ {D} } \cdot {\mathbf {n}} |_{ \partial K } = {D} \cdot {\mathbf {n}} |_{ \partial K } \). In particular, if \( ( A, \varphi ) \) is a solution to (3), then \( ( A, \varphi , H , {D} ) \) is a solution to (5).

Proof

Suppose \( ( A, \varphi , \widehat{ {H} } , \widehat{ {D} } ) \) is a solution to (5). By Proposition 1, (5c) implies \( A (t) \in \mathring{ H } ( {\text {curl}} ; \Omega ) \), so taking \( A ^\prime \in \mathring{ H } ( {\text {curl}} ; \Omega ) \) and summing (5a) over \( K \in {{\mathscr {T}}} _h \), the integrals over \( \partial K \) cancel, yielding (3a). As previously stated, (3a) implies \( {\text {curl}} H = \dot{ {D} } + J \), so substituting this into (5a) gives

$$\begin{aligned} \int _{ \partial K } ( A ^\prime \times {\widehat{H}} ) \cdot {\mathbf {n}}= & {} \int _K ( {\text {curl}} A ^\prime \cdot H - A ^\prime \cdot {\text {curl}} H ) \\= & {} \int _{ \partial K } ( A ^\prime \times H ) \cdot {\mathbf {n}} , \quad \forall A ^\prime \in H ( {\text {curl}} ; K ) , \end{aligned}$$

so \( {\widehat{H}} \times {\mathbf {n}} |_{ \partial K } = H \times {\mathbf {n}} |_{ \partial K } \). Similarly, (5d) implies \( \varphi (t) \in \mathring{ H } ^1 (\Omega ) \), so taking \( \varphi ^\prime \in \mathring{ H } ^1 (\Omega ) \) and summing (5b) over \( K \in {{\mathscr {T}}} _h \) yields (3b). This implies \( {\text {div}} {D} = \rho \), and substituting into (5b) gives \( \widehat{ {D} } \cdot {\mathbf {n}} |_{ \partial K } = {D} \cdot {\mathbf {n}} |_{ \partial K } \).

Conversely, suppose \( ( A, \varphi ) \) is a solution to (3). Since \( A (t) \in \mathring{ H } ( {\text {curl}} ; \Omega ) \) and \( \varphi (t) \in \mathring{ H } ^1 (\Omega ) \), it follows that (5c) and (5d) hold. Furthermore, (3) implies that \( \dot{ {D} } + J = {\text {curl}} H \) and \( {\text {div}} {D} = \rho \), so (5a) and (5b) hold with \( \widehat{ {H} } \times {\mathbf {n}} |_{ \partial K } = H \times {\mathbf {n}} |_{ \partial K } \) and \( \widehat{ {D} } \cdot {\mathbf {n}} |_{ \partial K } = {D} \cdot {\mathbf {n}} |_{ \partial K } \). In particular, we could take \( {\widehat{H}} = H \) and \( \widehat{ {D} } = {D} \). \(\square \)

Remark 6

Note that, in addition to (5b) implying that \( {\text {div}} {D} = \rho \), we also see by taking \( \varphi ^\prime = {\mathbf {1}} _K \) that \( \widehat{ {D} } \) satisfies the conservation law \( \int _{ \partial K } \widehat{ {D} } \cdot {\mathbf {n}} = \int _K \rho \), for all \( K \in {{\mathscr {T}}} _h \).

3.3 Temporal Gauge Fixing and the Charge Conservation Constraint

As in Sect. 2.2, if \( ( A, \varphi , {\widehat{H}} , \widehat{ {D} } ) \) is a solution to (5), then so is \( ( A + {\text {grad}} \xi , \varphi - {\dot{\xi }} , {\widehat{H}} , \widehat{ {D} } ) \) for any \( C ^1 \) curve \( t \mapsto \xi (t) \in \mathring{ H } ^1 (\Omega ) \). Therefore, we perform temporal gauge fixing by taking \( \varphi = 0 \). This yields the gauge-fixed Lagrangian

$$\begin{aligned} L ( A, {\widehat{H}}, {\dot{A}} , \dot{ {\widehat{H}} } ) = \sum _{ K \in {{\mathscr {T}}} _h } \Biggl [ \int _K \biggl ( \frac{1}{2} E \cdot {D} - \frac{1}{2} B \cdot H + A \cdot J \biggr ) + \int _{ \partial K } (A \times {\widehat{H}} ) \cdot {\mathbf {n}} \Biggr ], \end{aligned}$$

where we recall that \( {D} = \varepsilon E = - \varepsilon {\dot{A}} \) and \( B = \mu H = {\text {curl}} A \). The Euler–Lagrange equations are simply (5a) and (5c). Of course, (5d) is satisfied trivially, since \( \varphi = 0 \). The next result shows that the charge conservation constraint (5b) is automatically preserved, for an appropriately defined \( \widehat{ {D} } \).

Proposition 3

Let \( ( A, {\widehat{H}} ) \) be a solution to (5a) and (5c). Suppose initial values for \( {D}, \widehat{ {D} } \) satisfy (5b), and let \( \widehat{ {D} } \) be the solution to \( \dot{ \widehat{ {D} } } + J = {\text {curl}} {\widehat{H}} \). Then \( ( A, 0, {\widehat{H}} , \widehat{ {D} } ) \) is a solution to (5).

Proof

As we have already mentioned, \( \varphi = 0 \) trivially satisfies (5d), so it suffices to show that (5b) holds. Let \( \varphi ^\prime \in H ^1 (K) \) be arbitrary. Taking \( A ^\prime = {\text {grad}} \varphi ^\prime \) in (5a) and integrating by parts gives

$$\begin{aligned} 0&= \int _K {\text {grad}} \varphi ^\prime \cdot ( \dot{ {D} } + J ) + \int _{ \partial K } ({\text {grad}} \varphi ^\prime \times {\widehat{H}} ) \cdot {\mathbf {n}} \\&= \int _K ( {\text {grad}} \varphi ^\prime \cdot \dot{ {D} } - \varphi ^\prime {\text {div}} J ) + \int _{ \partial K } \varphi ^\prime ( J - {\text {curl}} {\widehat{H}} ) \cdot {\mathbf {n}} \\&= \int _K ( {\text {grad}} \varphi ^\prime \cdot \dot{ {D} } + \varphi ^\prime {\dot{\rho }} ) - \int _{ \partial K } \varphi ^\prime \dot{ \widehat{ {D} } } \cdot {\mathbf {n}} , \end{aligned}$$

so if (5b) holds at the initial time, then it holds for all time. \(\square \)

Remark 7

As in Remark 6, taking \( \varphi ^\prime = {\mathbf {1}} _K \) implies \( \int _{ \partial K } \widehat{ {D} } \cdot {\mathbf {n}} = \int _K \rho \). Furthermore, if the initial conditions also satisfy \( {\text {div}} \widehat{ {D} } = \rho \), then we have \( {\text {div}} \widehat{ {D} } = \rho \) for all time, since \( {\text {div}} \dot{ \widehat{ {D} } } = {\text {div}} {\text {curl}} {\widehat{H}} - {\text {div}} J = 0 + \dot{ \rho } \). Finally, if \( {\widehat{H}} = H \), and if the initial conditions for \( \widehat{ {D} } \) equal those for D , then we recover \( \widehat{ {D} } = {D} \).

Finally, we express this variational problem in the standard notation used for mixed and hybrid finite element methods, in terms of a pair of bilinear forms [13, Chapter II]. We will make use of this notation throughout the subsequent sections. Defining

$$\begin{aligned} a&:H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \times H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \rightarrow {\mathbb {R}} ,&a ( A , A ^\prime )&:=\sum _{ K \in {{\mathscr {T}}} _h } \int _K {\text {curl}} A ^\prime \cdot \mu ^{-1} {\text {curl}} A ,\\ b&:H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \times H ( {\text {curl}} ; \Omega ) \rightarrow {\mathbb {R}} ,&b ( A ^\prime , {\widehat{H}} )&:=- \sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } ( A ^\prime \times {\widehat{H}} ) \cdot {\mathbf {n}} , \end{aligned}$$

we seek \( t \mapsto A (t) \in H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \) and \( t \mapsto {\widehat{H}} (t) \in H ( {\text {curl}} ; \Omega ) \) such that

$$\begin{aligned} \langle \dot{ {D} } + J , A ^\prime \rangle&= a ( A , A ^\prime ) + b ( A ^\prime , {\widehat{H}} ) ,&\quad \forall A ^\prime&\in H ( {\text {curl}} ; {{\mathscr {T}}} _h ) , \end{aligned}$$
(6a)
$$\begin{aligned} 0&= b ( A, {\widehat{H}} ^\prime ) ,&\forall {\widehat{H}} ^\prime&\in H ( {\text {curl}} ; \Omega ) , \end{aligned}$$
(6b)

where \( \langle \cdot , \cdot \rangle \) is the \( L ^2 ( \Omega , {\mathbb {R}}^3 ) \) inner product. Defining the map \( {{\mathscr {B}}} :H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \rightarrow H ( {\text {curl}} ; \Omega ) ^*\), \( A \mapsto b ( A, \cdot ) \), we see that (6) is equivalent to evolving \( A (t) \in \ker {{\mathscr {B}}} \) by

$$\begin{aligned} \langle \dot{ {D} } + J , A ^\prime \rangle = a ( A , A ^\prime ) , \quad \forall A ^\prime \in \ker {{\mathscr {B}}} , \end{aligned}$$

and subsequently solving for \( {\widehat{H}} \) satisfying (6a). Indeed, these are equivalent since (6b) says that \( A \in \ker {{\mathscr {B}}} \), while taking \( A ^\prime \in \ker {{\mathscr {B}}} \) causes the \( b ( A ^\prime , {\widehat{H}} ) \) term to vanish on the right-hand side of (6a). Since \( \ker {{\mathscr {B}}} = \mathring{ H } ( {\text {curl}} ; \Omega ) \) by Proposition 1, it follows that A solves the non-domain-decomposed problem (3a).

4 Hybrid Semidiscretization

We now perform Galerkin semidiscretization of the domain-decomposed variational problem with temporal gauge fixing, as introduced in the previous section. This results in a hybrid method for Maxwell’s equations, where “hybrid” means that the Lagrange multipliers \( {\widehat{H}} _h \) and their test functions \( {\widehat{H}} _h ^\prime \) are both restricted to a subspace of \( H ( {\text {curl}}; \Omega ) \). We then show that a suitably defined \( \widehat{ {D} } _h \) satisfies the charge conservation constraint in a strong sense, as opposed to the much weaker sense in which \( {D} _h \) was seen to satisfy this constraint in Sect. 2.3. Finally, we discuss how certain choices of elements yield a hybridized version of Nédélec’s method, while others give nonconforming methods, and we remark on how this framework also applies to the 2-D Maxwell equations.

4.1 Semidiscretization of the Variational Problem

For each \( K \in {{\mathscr {T}}} _h \), let \( V _h ^1 (K) \subset H ( {\text {curl}}; K ) \) be a finite-dimensional subspace, so \( V _h ^1 :=\prod _{ K \in {{\mathscr {T}}} _h } V _h ^1 (K) \subset H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \), and let \( {\widehat{V}} _h ^1 \subset H ( {\text {curl}} ; \Omega ) \). We seek \( A _h :t \mapsto A _h (t) \in V _h ^1 \) and \( {\widehat{H}} _h :t \mapsto {\widehat{H}} _h (t) \in {\widehat{V}} _h ^1 \) such that

$$\begin{aligned} \int _K \bigl ( A _h ^\prime \cdot ( \dot{ {D} } _h \!+\! J ) - {\text {curl}} A _h ^\prime \cdot H _h \bigr ) \!+\! \int _{ \partial K } ( A _h ^\prime \times {\widehat{H}} _h ) \cdot {\mathbf {n}}&= 0,&\forall A _h ^\prime&\in V _h ^1 (K) , \end{aligned}$$
(7a)
$$\begin{aligned} \sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } ( A _h \times {\widehat{H}} _h ^\prime ) \cdot {\mathbf {n}}&= 0 ,&\forall \widehat{ H } _h ^\prime&\in {\widehat{V}} _h ^1 , \end{aligned}$$
(7b)

where (7a) holds for all \(K \in {{\mathscr {T}}} _h \). These are the semidiscretized versions of (5a) and (5c). As before, \( E _h :=- {\dot{A}} _h \), \( B _h :={\text {curl}} A _h \), \( {D} _h :=\varepsilon E _h \), and \( H _h :=\mu ^{-1} B _h \).

Remark 8

Since (7b) only holds for test functions in \( {\widehat{V}} _h ^1 \), but not necessarily an arbitrary test function in \( H ( {\text {curl}}; \Omega ) \), in general a solution will have \( A _h (t) \notin \mathring{ H } ( {\text {curl}} ; \Omega ) \). Hence, this method is generally not curl-conforming and is distinct from the conforming methods discussed in Sect. 2.3.

In terms of the bilinear forms \( a ( \cdot , \cdot ) \) and \( b ( \cdot , \cdot ) \), this method may be written as

$$\begin{aligned} \langle \dot{ {D} } _h + J , A _h ^\prime \rangle&= a ( A _h , A _h ^\prime ) + b ( A _h ^\prime , {\widehat{H}} _h ) ,&\quad \forall A _h ^\prime&\in V _h ^1 , \end{aligned}$$
(8a)
$$\begin{aligned} 0&= b ( A _h , {\widehat{H}} _h ^\prime ) ,&\forall {\widehat{H}} _h ^\prime&\in {\widehat{V}} _h ^1 . \end{aligned}$$
(8b)

Defining the operator \( {{\mathscr {B}}} _h :V _h ^1 \rightarrow ( {\widehat{V}} _h ^1 ) ^*\), \( A _h \mapsto b ( A _h , \cdot ) |_{ {\widehat{V}} _h ^1 } \), we see that (8) is equivalent to evolving \( A _h (t) \in \ker {{\mathscr {B}}} _h \) by solving the second-order system of ODEs

$$\begin{aligned} \langle \dot{ {D} } _h + J , A _h ^\prime \rangle = a ( A _h , A _h ^\prime ) , \quad \forall A _h ^\prime \in \ker {{\mathscr {B}}} _h , \end{aligned}$$
(9)

and subsequently solving for \( {\widehat{H}} _h \) satisfying (8a). As with the infinite-dimensional problem, this equivalence holds since (8b) implies \( A _h \in \ker {{\mathscr {B}}} _h \) and \( A _h ^\prime \in \ker {{\mathscr {B}}} _h \) causes the \( b ( A _h ^\prime , {\widehat{H}} _h ) \) term to vanish on the right-hand side of (8a).

Since \( V _h ^1 \) is finite-dimensional, we may apply Banach’s closed range theorem to deduce that \( \langle \dot{ {D} } _h + J , \cdot \rangle - a ( A _h , \cdot ) \in (\ker {{\mathscr {B}}} _h) ^\perp \) is in the range of \( {{\mathscr {B}}} _h ^*\), so a solution \( {\widehat{H}} _h \) exists, although generally not uniquely. A natural choice is to find the solution \( {\widehat{H}} _h \) minimizing \( \Vert H _h - {\widehat{H}} _h \Vert ^2 + \Vert \dot{ {D} } _h + J - {\text {curl}} {\widehat{H}} _h \Vert ^2 \), which in a weak sense minimizes the \( H ( {\text {curl}} ; \Omega ) \) distance between \( H _h \) and \( {\widehat{H}} _h \). This existence without uniqueness is typical of hybrid methods, and one may formally resolve this by replacing \( {\widehat{V}} _h ^1 \) by the quotient space \( {\widehat{V}} _h ^1 / \ker {{\mathscr {B}}} _h ^*\) (cf. Brezzi and Fortin [13, IV.1.3]). In practice, the evolution on \( \ker {{\mathscr {B}}} _h \) specified by (9) is the essence of the method, and solving for \( {\widehat{H}} _h \) may be seen as an optional post-processing step.

4.2 Preservation of the Charge Conservation Constraint

In order to discuss the charge conservation constraint, we first suppose that \( V _h ^0 (K) \subset H ^1 (K) \) are such that \( {\mathbf {1}} _K \in V _h ^0 (K) \) and \( {\text {grad}} V _h ^0 (K) \subset V _h ^1 (K) \) for all \( K \in {{\mathscr {T}}} _h \). We consider whether the following discretization of (5b) is preserved,

$$\begin{aligned} \int _K ( {\text {grad}} \varphi _h ^\prime \cdot {D} _h + \varphi _h ^\prime \rho ) - \int _{ \partial K } \varphi _h ^\prime \widehat{ {D} } _h \cdot {\mathbf {n}} = 0, \quad \forall \varphi ^\prime _h \in V _h ^0 (K) , \end{aligned}$$
(10)

for \( \widehat{ {D} } _h :t \mapsto \widehat{ {D} } _h (t) \in H ( {\text {div}} ; \Omega ) \) suitably defined.

Theorem 1

Let \( ( A _h , {\widehat{H}} _h ) \) be a solution to (7). Suppose initial values for \( {D} _h , \widehat{ {D} } _h \) satisfy (10), and let \( \widehat{ {D} } _h \) be the solution to \( \dot{ \widehat{ {D} } } _h + J = {\text {curl}} {\widehat{H}} _h \). Then (10) holds for all time. In particular, \( \int _{ \partial K } \widehat{ {D} } _h \cdot {\mathbf {n}} = \int _K \rho \). Moreover, if \( {\text {div}} \widehat{ {D} } _h = \rho \) holds at the initial time, then it holds for all time.

Proof

The proof is essentially similar to that of Proposition 3. Given \( \varphi _h ^\prime \in V _h ^0 (K) \), taking \( A _h ^\prime = {\text {grad}} \varphi _h ^\prime \in V _h ^1 (K) \) in (7a) and integrating by parts,

$$\begin{aligned} 0&= \int _K {\text {grad}} \varphi _h ^\prime \cdot ( \dot{ {D} } _h + J ) + \int _{ \partial K } ( {\text {grad}} \varphi _h ^\prime \times {\widehat{H}} _h ) \cdot {\mathbf {n}} \\&= \int _K ( {\text {grad}} \varphi _h ^\prime \cdot \dot{ {D} } _h - \varphi _h ^\prime {\text {div}} J ) + \int _{ \partial K } \varphi _h ^\prime ( J - {\text {curl}} {\widehat{H}} _h ) \cdot {\mathbf {n}} \\&= \int _K ( {\text {grad}} \varphi _h ^\prime \cdot \dot{ {D} } _h + \varphi _h ^\prime {\dot{\rho }} ) - \int _{ \partial K } \varphi _h ^\prime \dot{ \widehat{ {D} } } _h \cdot {\mathbf {n}} , \end{aligned}$$

so if (10) holds at the initial time, then it holds for all time. The conclusion that \( \int _{ \partial K } \widehat{ {D} } _h \cdot {\mathbf {n}} = \int _K \rho \) follows by taking \( \varphi _h ^\prime = {\mathbf {1}} _K \), and \( {\text {div}} \dot{ \widehat{ {D} } } _h = {\text {div}} {\text {curl}} {\widehat{H}} _h - {\text {div}} J = 0 + {\dot{\rho }} \) implies that if \( {\text {div}} \widehat{ {D} } _h = \rho \) holds at the initial time, then it holds for all time. \(\square \)

Remark 9

Preservation of \( {\text {div}} \widehat{ {D} } _h = \rho \) is immediate from \( \dot{ \widehat{ {D} } } _h + J = {\text {curl}} {\widehat{H}} _h \), without appealing to (10). However, it is only a meaningful statement about solutions to (7) when (10) holds. By contrast, if \( \widehat{ {D} } _h \) were instead to satisfy \( \dot{ \widehat{ {D} } } _h + J = 0 \), then \( {\text {div}} \widehat{ {D} } _h = \rho \) would still be preserved, but this would not say anything about the numerical solution \( ( A _h , {\widehat{H}} _h ) \).

The next result addresses the existence of initial conditions for \( \widehat{ {D} } _h \) satisfying the hypotheses of the previous theorem. Let \( V _h ^0 :=\prod _{ K \in {{\mathscr {T}}} _h } V _h ^0 (K) \subset H ^1 ( {{\mathscr {T}}} _h ) \).

Proposition 4

Suppose that the initial value of \( {D} _h \) satisfies

$$\begin{aligned} \sum _{ K \in {{\mathscr {T}}} _h } \int _K {\text {grad}} \varphi _h ^\prime \cdot {D} _h + \int _\Omega \varphi _h ^\prime \rho = 0 , \quad \forall \varphi _h ^\prime \in V _h ^0 \cap \mathring{ H } ^1 (\Omega ) . \end{aligned}$$

Then there exists an initial value for \( \widehat{ {D} } _h \in H ( {\text {div}}; \Omega ) \) such that (10) holds for all \( K \in {{\mathscr {T}}} _h \) and \( {\text {div}} \widehat{ {D} } _h = \rho \).

Proof

The first part of the argument is similar to the one we used for the existence of \( {\widehat{H}} _h \). Define the bilinear form

$$\begin{aligned} \beta _h :V _h ^0 \times H ( {\text {div}}; \Omega ) \rightarrow {\mathbb {R}} , \quad \beta _h ( \varphi _h ^\prime , \widehat{ {D} } _h ) :=\sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } \varphi _h ^\prime \widehat{ {D} } _h \cdot {\mathbf {n}} , \end{aligned}$$

and consider the map \( V _h ^0 \rightarrow H ( {\text {div}}; \Omega ) ^*\) defined by \( \varphi _h ^\prime \mapsto \beta _h ( \varphi _h ^\prime , \cdot ) \). By Brezzi and Fortin [13, Proposition III.1.1], we have \( \beta _h ( \varphi _h ^\prime , \cdot ) = 0 \) if and only if \( \varphi _h ^\prime \in \mathring{ H } ^1 (\Omega ) \), so \( V _h ^0 \cap \mathring{ H } ^1 (\Omega ) \) is precisely the kernel of this map. Now, the hypothesis of this proposition says that the functional \( \varphi _h ^\prime \mapsto \sum _{ K \in {{\mathscr {T}}} _h } \int _K {\text {grad}} \varphi _h ^\prime \cdot {D} _h + \int _\Omega \varphi _h ^\prime \rho \) annihilates the kernel \( V _h ^0 \cap \mathring{ H } ^1 (\Omega ) \), so by the closed range theorem, it is in the range of the adjoint \( \widehat{ {D} } _h \mapsto \beta _h ( \cdot , \widehat{ {D} } _h ) \). Hence, there exists an initial value for \( \widehat{ {D} } _h \) satisfying (10) for all \(K \in {{\mathscr {T}}} _h \).

Next, suppose \( \widehat{ {D} } _h \) satisfies (10), but not necessarily \( {\text {div}} \widehat{ {D} } _h = \rho \). Then, on each \( K \in {{\mathscr {T}}} _h \), replace \( \widehat{ {D} } _h \) by \( \widehat{ {D} } _h + {\text {grad}} u \), where u is the solution to \( - \Delta u = {\text {div}} \widehat{ {D} } _h - \rho \) with Neumann boundary conditions \( {\text {grad}} u \cdot {\mathbf {n}} = 0 \) on \( \partial K \) and \( \int _K u = 0 \). This solution exists, since taking \( \varphi _h ^\prime = {\mathbf {1}} _K \) in (10) implies the compatibility condition \( \int _K ( {\text {div}} \widehat{ {D} } _h - \rho ) = \int _{ \partial K } \widehat{ {D} } _h \cdot {\mathbf {n}} - \int _K \rho = 0 \). Replacing \( \widehat{ {D} } _h \) by \( \widehat{ {D} } _h + {\text {grad}} u \) leaves the normal traces of \( \widehat{ {D} } _h \) unchanged, since \( {\text {grad}} u \cdot {\mathbf {n}} = 0 \), so the result is still in \( H ( {\text {div}}; \Omega ) \) and satisfies (10), as desired. \(\square \)

Remark 10

The computation of \( \widehat{ {D} } _h \), like that of \( {\widehat{H}} _h \), can be seen as an optional post-processing step after computing the solution \( A _h \) to (9). The key point of Theorem 1 is that the evolution of \( A _h \) is conservative, in the sense that it is consistent with a charge-conserving numerical flux \( \widehat{ {D} } _h \), whether or not one chooses to actually compute \( \widehat{ {D} } _h \).

4.3 Hybridization of Nédélec’s Method

As in Sect. 2.3, let \( \Omega \) be polyhedral and \( {{\mathscr {T}}} _h \) be a simplicial triangulation. Let \( V _h ^0 (K) \) be the space of degree-r polynomials on K and \( V _h ^1 (K) \) be either degree-r Nédélec edge elements of the first kind or degree-\((r-1)\) Nédélec edge elements of the second kind on K. Then \( V _h ^0 \subset H ^1 ( {{\mathscr {T}}} _h ) \) and \( V _h ^1 \subset H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \) correspond to discontinuous Lagrange and Nédélec elements, respectively. Note that discontinuous Nédélec elements of the second kind are just discontinuous piecewise polynomial vector fields.

Now, taking \( {\widehat{V}} _h ^1 = H ( {\text {curl}}; \Omega ) \), it follows that \( \ker {{\mathscr {B}}} _h = V _h ^1 \cap \ker {{\mathscr {B}}} \subset \mathring{ H } ( {\text {curl}} ; \Omega ) \), which corresponds precisely to curl-conforming Nédélec elements with tangential inter-element continuity and boundary conditions. It follows that (9) agrees precisely with Nédélec’s method (4). In fact, it is not necessary to take \( {\widehat{V}} _h ^1 \) infinite-dimensional: It suffices to take a large enough finite-dimensional subspace (e.g., Nédélec elements of sufficiently high degree) such that (7b) imposes all the inter-element continuity and boundary conditions on degrees of freedom of \( V _h ^1 \). (Having \( {\widehat{V}} _h ^1 \) infinite-dimensional is not a problem if one is only interested in \( A _h \), but a finite-dimensional subspace is required if one wishes to compute \( {\widehat{H}} _h \).) From these observations, we obtain the following corollary of Theorem 1 and Proposition 4.

Corollary 1

Given \( V _h ^0 \) and \( V _h ^1 \) as above, there exists \( {\widehat{V}} _h ^1 \) such that solutions \( A _h \) to Nédélec’s method (4) are equivalent to solutions \( ( A _h , {\widehat{H}} _h ) \) to the hybrid method (7). Consequently, given a solution to Nédélec’s method, there exists \( \widehat{ {D} } _h \) satisfying \( \dot{ \widehat{ {D} } } _h + J = {\text {curl}} {\widehat{H}} _h \), which preserves the charge conservation constraints (10) and \( {\text {div}} \widehat{ {D} } _h = \rho \).

Remark 11

In contrast, if \( {\widehat{V}} _h ^1 \) is not sufficiently large, we will have \( \ker {{\mathscr {B}}} _h \not \subset \ker {{\mathscr {B}}} = \mathring{ H } ( {\text {curl}}; \Omega ) \), so (9) is a nonconforming finite element method for Maxwell’s equations.

4.4 Remarks on the Two-Dimensional Case

This framework may also be adapted to two-dimensional electromagnetics with minor modifications, where the two-dimensional cross product is \( ( u _1, u _2 ) \times ( v _1, v _2 ) :=u _1 v _2 - u _2 v _1 \).

For the non-domain-decomposed problem on \( \Omega \subset {\mathbb {R}}^2 \), the potential \(A \in \mathring{ H } ( {\text {curl}}; \Omega ) \) remains a vector field, although \( {\text {curl}} A \in L ^2 (\Omega ) \) becomes a scalar field. Consequently, E and D remain vector fields (and \(\varepsilon \) remains a tensor), while B and H become scalar fields (and \(\mu \) becomes scalar). The two-dimensional version of the weak problem (3a) is nearly identical, except the dot product \( {\text {curl}} A ^\prime \cdot H \) is replaced by the ordinary product \( ( {\text {curl}} A ^\prime ) H \). For the Galerkin semidiscretization discussed in Sect. 2.3, one simply replaces the Nédélec edge elements of the first and second kind with Raviart–Thomas (RT) [41] and Brezzi–Douglas–Marini (BDM) [12] edge elements, respectively. These two-dimensional \( H ( {\text {curl}} ) \) elements are just the RT and BDM \( H ( {\text {div}} ) \) elements rotated by 90\(^\circ \), so that tangential traces of the former correspond to normal traces of the latter.

For domain decomposition, Proposition 1 is easily modified to show that

$$\begin{aligned} \mathring{ H } ( {\text {curl}} ; \Omega ) = \bigl \{ u \in H ( {\text {curl}}; {{\mathscr {T}}} _h ) : \sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } u \lambda \times {\mathbf {n}} = 0 , \text { for all } \lambda \in H ^1 ( \Omega ) \bigr \} . \end{aligned}$$

Alternatively, this can be seen to follow from the corresponding result for \( \mathring{ H } ( {\text {div}}; \Omega ) \), where the vector fields are rotated by 90\(^{\circ }\). Hence, the domain-decomposed variational problem in temporal gauge is to find \( t \mapsto A (t) \in H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \) and \( t \mapsto {\widehat{H}} (t) \in H ^1 ( \Omega ) \) such that

$$\begin{aligned} \int _K \bigl ( A ^\prime \cdot ( \dot{ {D} } + J ) - ( {\text {curl}} A ^\prime ) H \bigr ) + \int _{ \partial K } A ^\prime {\widehat{H}} \times {\mathbf {n}}&= 0 , \quad&\forall A ^\prime&\in H ( {\text {curl}} ; K ) ,\\ \sum _{ K \in {{\mathscr {T}}} _h } \int _{ \partial K } A {\widehat{H}} ^\prime \times {\mathbf {n}}&= 0 , \quad&\forall {\widehat{H}} ^\prime&\in H ^1 (\Omega ) , \end{aligned}$$

for all \( K \in {{\mathscr {T}}} _h \). Hybrid methods may then be obtained by restricting this variational problem to subspaces \( V _h ^1 = \prod _{ K \in {{\mathscr {T}}} _h } V _h ^1 (K) \subset H ( {\text {curl}} ; {{\mathscr {T}}} _h ) \) and \( {\widehat{V}} _h ^0 \subset H ^1 (\Omega ) \). As in Sect. 4.2, one obtains \( \widehat{ {D} } _h (t) \in H ( {\text {div}}; \Omega ) \) by solving \( \dot{ \widehat{ {D} } } _h + J = {\text {curl}} {\widehat{H}} _h \) (where the curl of a scalar field is its gradient rotated by 90 degrees, i.e., \( v \cdot {\text {curl}} {\widehat{H}} _h :=v \times {\text {grad}} {\widehat{H}} _h \) for \( v \in {\mathbb {R}}^2 \)), and the charge-conserving properties follow in the same manner.

For the finite element spaces, one may take \( V _h ^0 \) to be discontinuous degree-r Lagrange elements and \( V _h ^1 \) to be discontinuous degree-r RT edge elements or discontinuous degree-\((r-1)\) BDM edge elements. (Note that discontinuous BDM elements are just discontinuous piecewise polynomial vector fields.) In this case, it is much easier to see which \( {\widehat{V}} _h ^0 \subset H ^1 (\Omega ) \) yield conforming methods, since each edge degree of freedom either is shared by exactly two triangles or lies on the boundary. Both the degree-r RT and degree-\((r-1)\) BDM elements have r degrees of freedom per edge, which match up precisely with those for degree-\((r+1)\) Lagrange elements. Hence, taking \( {\widehat{V}} _h ^0 \) corresponding to degree-\((r+1)\) or higher Lagrange elements yields a conforming method. On the other hand, a straightforward counting argument shows that degree-r Lagrange elements have fewer than \( r \times \#\text {edges} \) degrees of freedom on element boundaries (unless \( {{\mathscr {T}}} _h \) consists of a single triangle). Since it is impossible to enforce all of the inter-element and boundary conditions in this case, the resulting method is nonconforming.

5 Numerical Examples

This section gives numerical illustrations for the simple test problem

$$\begin{aligned} {\ddot{A}} + {\text {curl}} {\text {curl}} A = 0 , \end{aligned}$$
(11)

which corresponds to the case where \(\varepsilon \) and \(\mu \) are positive constants with \( \varepsilon \mu = 1 \) and \( J = 0 \), as discussed at the end of Sect. 2.1. As before, A is taken to have vanishing tangential component on the boundary. Preservation of the charge conservation constraint is equivalent to the condition \( {\text {div}} {\ddot{A}} = 0 \).

In the frequency domain, denoting angular frequency by \(\omega \), time differentiation becomes multiplication by \( i \omega \), so (11) becomes the eigenvalue problem

$$\begin{aligned} {\text {curl}} {\text {curl}} A = \omega ^2 A . \end{aligned}$$
(12)

In this setting, preservation of the charge conservation constraint becomes \( \omega ^2 {\text {div}} A = 0 \), i.e., eigenfunctions with nonzero eigenvalue are divergence-free.

The examples below demonstrate the constraint-preserving properties of the curl-conforming hybridized Nédélec method from Sect. 4.3, both in the time domain and in the frequency domain. For the 2-D frequency domain problem, we also observe superconvergence of \( {\widehat{H}} _h \rightarrow H \). All finite element computations were performed using FEniCS [1, 33]. For the post-processing step of computing \( {\widehat{H}} _h \), whose solution is not unique, we find the solution \( {\widehat{H}} _h \) minimizing \( \Vert H _h - {\widehat{H}} _h \Vert ^2 + \Vert \dot{ {D} } _h + J - {\text {curl}} {\widehat{H}} _h \Vert ^2 \), as previously discussed in Sect. 4.1.

5.1 Time Domain

Before turning our attention to the test problem (11), we first describe a discrete time-stepping scheme for the general case of Maxwell’s equations. After semidiscretizing using the hybridized Nédélec method of Sect. 4.3, we discretize in time using the following explicit “leapfrog” scheme:

  • \( A _{ n + 1/2 } = A _n - \frac{1}{2} \Delta t \varepsilon ^{-1} {D} _n \).

  • \( {D} _{ n + 1 } = {D} _n + \Delta t \dot{ {D} } _{ n + 1/2 } \), where \( {\dot{D}} _{ n + 1/2 } \in \ker {{\mathscr {B}}} _h \) is the solution to

    $$\begin{aligned} \langle \dot{ {D} } _{ n + 1/2 } + J _{ n + 1/2 } , A _h ^\prime \rangle = a ( A _{n+1/2} , A _h ^\prime ) , \quad \forall A _h ^\prime \in \ker {{\mathscr {B}}} _h. \end{aligned}$$
  • \( \widehat{ {D} } _{ n + 1 } = \widehat{ {D} } _n + \Delta t ( {\text {curl}} {\widehat{H}} _{ n + 1/2 } - J _{ n + 1/2} ) \), where \( {\widehat{H}} _{ n + 1/2 } \) is the solution to

    $$\begin{aligned} \langle \dot{ {D} } _{n+1/2} + J_{n+1/2} , A _h ^\prime \rangle = a ( A _{n+1/2} , A _h ^\prime ) + b ( A _h ^\prime , {\widehat{H}} _{n+1/2} ) , \qquad \forall A _h ^\prime \in V _h ^1 , \end{aligned}$$

    minimizing \( \Vert H _{n+1/2} - {\widehat{H}} _{n+1/2} \Vert ^2 + \Vert \dot{ {D} } _{n+1/2} + J _{n+1/2} - {\text {curl}} \widehat{ H } _{n+1/2} \Vert ^2 \), with \( H _{ n + 1/2 } :=\mu ^{-1} {\text {curl}} A _{ n + 1/2 } \).

  • \( A _{ n + 1 } = A _{n+1/2} - \frac{1}{2} \Delta t \varepsilon ^{-1} {D} _{n+1} \).

Here, \( A _n \) denotes the approximation to \( A _h ( t _n ) \), where \( t _n \) is the nth time step and \( \Delta t \) is the time step size; similar notation is used for the other variables. This is essentially the Störmer/Verlet method for the semidiscretized system of ODEs (9), augmented by a hybrid post-processing step for \( {\widehat{H}} _h \) and \( \widehat{ {D} } _h \). Except for the hybrid post-processing step, which is novel, such leapfrog schemes are widely used for both finite element and finite difference time domain methods in computational electromagnetics (see Yee [43], Monk [35, Section 5]). The Störmer/Verlet method also has particularly desirable properties when applied to Lagrangian and Hamiltonian dynamics (cf. Hairer et al. [24, 25]).

Fig. 1
figure 1

Charge conservation error, as measured by the \( H ( {\text {div}} ; {{\mathscr {T}}} _h ) \) seminorm of \( {D} _h \) and \( \widehat{ {D} } _h \), over time, on the 2-D square \( \Omega = ( 0, \pi ) ^2 \) (left) and 3-D cube \( \Omega = ( 0, \pi ) ^3 \) (right). Although \( {D} _h \) drifts away from the constraint, \( \widehat{ {D} } _h \) preserves the constraint

Figure 1 shows the results of applying this method to the test problem (11) on the 2-D square \( \Omega = ( 0, \pi ) ^2 \) and 3-D cube \( \Omega = ( 0, \pi ) ^3 \), taking \( \varepsilon = \mu = 1 \). For both the 2-D and 3-D problems, we simulate over \( t \in [ 0, 2 \pi ] \) for 1024 time steps of size \( \Delta t = \pi / 512 \).

For the 2-D problem, the initial conditions are taken to be \( {D} _0 = \widehat{ {D} } _0 = 0 \) and

$$\begin{aligned} A _0 ( x, y ) = \bigl ( y ( \pi - y ) , x ( \pi - x ) \bigr ) . \end{aligned}$$

A uniform triangular mesh is taken on a \( 16 \times 16 \) grid, with \( 2 \cdot 16 ^2 = 512 \) cells. The space \( V _h ^1 \) consists of discontinuous piecewise linear vector fields, while \( {\widehat{V}} _h ^0 \) consists of cubic Lagrange elements, so that \( \ker {{\mathscr {B}}} _h \subset V _h ^1 \) are linear BDM edge elements, as described in Sect. 4.4 with \( r = 2 \).

For the 3-D problem, the initial conditions are taken to be \( {D} _0 = \widehat{ {D} } _0 = 0 \) and

$$\begin{aligned} A _0 ( x, y, z ) = \bigl ( y ( \pi - y ) z ( \pi - z ) , z ( \pi - z ) x ( \pi - x ), x ( \pi - x ) y ( \pi - y ) \bigr ) . \end{aligned}$$

A uniform tetrahedral mesh is taken on an \( 8 \times 8 \times 8 \) grid, with \( 6 \cdot 8 ^3 = 3072 \) cells. The space \( V _h ^1 \) consists of discontinuous piecewise linear vector fields, while \( {\widehat{V}} _h ^1 \) consists of cubic Nédélec edge elements of the second kind, so that \( \ker {{\mathscr {B}}} _h \subset V _h ^1 \) are linear Nédélec edge elements of the second kind, as described in Sect. 4.3 with \( r = 2 \).

Although the exact solution satisfies \( {\text {div}} {D} = 0 \), the numerical solution \( {D} _h \) drifts away from this constraint, as measured by the \( H ( {\text {div}} ; {{\mathscr {T}}} _h ) \) seminorm,

$$\begin{aligned} |{D} _h |_{ H ( {\text {div}}; {{\mathscr {T}}} _h ) } :=\sqrt{ \sum \nolimits _{ K \in {{\mathscr {T}}} _h } \Vert {\text {div}} {D} _h \Vert ^2 _{ L ^2 (K) } } . \end{aligned}$$

However, \( {\text {div}} \widehat{ {D} } _h = 0 \) holds to machine precision, as explained by Theorem 1. Looking at \( {D} _h \) alone, one might think that this method fails to preserve the charge conservation constraint strongly. In fact, we have illustrated that it actually does preserve this constraint, when expressed in terms of the numerical flux \( \widehat{ {D} } _h \) rather than \( {D} _h \).

Remark 12

The constraint behavior of \( {D} _h \) and \( \widehat{ {D} } _h \), observed in Fig. 1, is due to the finite element semidiscretization, not the time discretization. Indeed, the charge conservation constraint is linear, so if it holds for the semidiscretized system of ODEs, then any Runge–Kutta or partitioned Runge–Kutta method preserves it [25, Theorem IV.1.2].

Fig. 2
figure 2

\( {D} _h \) and \( {\text {div}} {D} _h \) (top row), compared to \( \widehat{ {D} } _h \) and \( {\text {div}} \widehat{ {D} } _h \) (bottom row), approximating the Maxwell eigenmode with \(\omega ^2 = 2\). While \( {D} _h \) and \( \widehat{ {D} } _h \) are nearly indistinguishable (left column), \( {D} _h \) fails to be strongly divergence-free and \( \widehat{ {D} } _h \) is divergence-free (right column)

5.2 Frequency Domain

We next apply the hybrid approach to the frequency domain, again assuming that \(\varepsilon \) and \(\mu \) are positive constants with \( \varepsilon \mu = 1 \) and \( J = 0 \). This is done by first approximating the Maxwell eigenvalue problem (12) on \( \ker {{\mathscr {B}}} _h \) and then applying hybrid post-processing, as follows:

  • Find eigenpairs \( ( \omega _h ^2 , A _h ) \in {\mathbb {R}} ^{ + } \times \ker {{\mathscr {B}}} _h \) satisfying

    $$\begin{aligned} a ( A _h , A _h ^\prime ) = \omega _h ^2 \langle A _h , A _h ^\prime \rangle , \quad \forall A _h ^\prime \in \ker {{\mathscr {B}}} _h , \end{aligned}$$

    and let \( H _h :=\mu ^{-1} {\text {curl}} A _h \) and \( {D} _h :=\varepsilon ( - i \omega _h A _h ) \).

  • Find \( {\widehat{H}} _h \) minimizing \( \Vert H _h - {\widehat{H}} _h \Vert ^2 + \Vert i \omega _h {D} _h - {\text {curl}} {\widehat{H}} _h \Vert ^2 \) such that

    $$\begin{aligned} a ( A _h , A _h ^\prime ) + b ( A _h ^\prime , {\widehat{H}} _h ) = \omega _h ^2 \langle A _h , A _h ^\prime \rangle , \quad \forall A _h ^\prime \in V _h ^1 , \end{aligned}$$

    and let \( \widehat{ {D} } _h :=- i \omega _h ^{-1} {\text {curl}} {\widehat{H}} _h \).

Note that this last step is equivalent to \( i \omega _h \widehat{ {D} } _h = {\text {curl}} {\widehat{H}} _h \), so \( {\widehat{H}} _h \) can be seen as minimizing \( \Vert H _h - {\widehat{H}} _h \Vert ^2 + \omega _h ^2 \Vert {D} _h - \widehat{ {D} } _h \Vert ^2 \).

We consider the 2-D square \( \Omega = ( 0, \pi ) ^2 \), where the exact eigenvalues are sums of squares (\( \omega ^2 = 1, 1, 2, 4, 4, \ldots \)). For simplicity, we look at the approximation of the following analytical solution with simple eigenvalue \( \omega ^2 = 2 \), assuming \( \varepsilon = \mu = 1 \):

$$\begin{aligned} A(x,y)&= \frac{ \sqrt{ 2 } }{ \pi } ( -\cos x \sin y, \sin x \cos y ) ,\\ H(x,y)&= \frac{ 2 \sqrt{ 2 } }{ \pi } \cos x \cos y ,\\ {D} (x,y)&= \frac{ 2 i }{ \pi } ( \cos x \sin y, - \sin x \cos y ). \end{aligned}$$

We take a uniform triangle mesh on an \( N \times N \) grid, which has \( 2 N ^2 \) cells. As described in Sect. 4.4, we take \( V _h ^1 \) to consist of discontinuous piecewise degree-\((r-1)\) vector fields and \( {\widehat{V}} _h ^0 \) to consist of degree-\( (r+1) \) Lagrange elements, so that \( \ker {{\mathscr {B}}} _h \subset V _h ^1 \) are degree-\((r-1)\) BDM edge elements.

Figure 2 shows \( {D} _h \) and \( \widehat{ {D} } _h \), along with \( {\text {div}} {D} _h \) and \( {\text {div}} \widehat{ {D} } _h \), for the case \( N = 16 \), \( r = 2 \). Here, by \( {\text {div}} {D} _h \in L ^2 ({{\mathscr {T}}} _h) \), we mean the element-wise divergence \( ({\text {div}} {D} _h) |_K :={\text {div}} ( {D} _h |_K ) \) for each \( K \in {{\mathscr {T}}} _h \), since \( {D} _h \) is in \( H ( {\text {div}} ; {{\mathscr {T}}} _h ) \), but not in \( H ( {\text {div}} ; \Omega ) \). Although the vector fields \( {D} _h \) and \( \widehat{ {D} } _h \) appear very similar, they behave very differently with respect to the charge conservation constraint: \( {\text {div}} {D} _h \ne 0 \), while \( {\text {div}} \widehat{ {D} } _h = 0 \) to machine precision. Note that these are purely imaginary when \( A _h \) is real, so the imaginary parts are plotted.

Table 1 Convergence of the hybridized method for the \( \omega ^2 = 2 \) eigenmode of \( \Omega = ( 0, \pi ) ^2 \), using a uniform triangle mesh on an \( N \times N \) grid and degree-\((r-1)\) BDM edge elements. The post-processed solution \( {\widehat{H}} _h \) exhibits superconvergence relative to \( H _h \), while the errors and convergence rates of \( \widehat{ {D} } _h \) are comparable to those of \( {D} _h \)

Table 1 illustrates the convergence behavior of \( H _h \), \( {\widehat{H}} _h , {D} _h \), and \( \widehat{ {D} } _h \) as the mesh parameter \( h \rightarrow 0 \), for elements of various degrees. Since \( A _h \) is simply obtained by using degree-\((r-1)\) BDM edge elements for the Maxwell eigenvalue problem, previous analyses of this problem (e.g., [3, 6, 7, 26, 32] and references therein) show that \( \Vert A _h - A \Vert = {{\mathscr {O}}} ( h ^r ) \) and \( \Vert {\text {curl}} A _h - {\text {curl}} A \Vert = {{\mathscr {O}}} ( h ^{ r -1 } ) \), which imply the observed rates \( \Vert {D} _h - {D} \Vert = {{\mathscr {O}}} ( h ^r ) \) and \( \Vert H _h - H \Vert = {{\mathscr {O}}} ( h ^{ r -1 } ) \). Interestingly, for \( {\widehat{H}} _h \) obtained by hybrid post-processing, we observe the superconvergent rates \( \Vert {\widehat{H}} _h - H \Vert = {{\mathscr {O}}} ( h ^r ) \) for \( r = 2 \) and \( {{\mathscr {O}}} ( h ^{ r + 1 } ) \) for \( r > 2 \). For \( \widehat{ {D} } _h \), we observe errors comparable to those for \( {D} _h \) and the same convergence rate, \( \Vert \widehat{ {D} } _h - {D} \Vert = {{\mathscr {O}}} ( h ^r ) \).

We note that the observed rates of superconvergence, including the reduced rate in the lowest degree case, are the same as those obtained for scalar elliptic problems by [12] in the original paper on the hybridized BDM method. On the other hand, preliminary numerical experiments in 3-D do not show superconvergence. This leads us to believe that this phenomenon arises in 2-D due to the fact that BDM \( H ({\text {curl}}) \) elements are simply rotated \( H ({\text {div}}) \) elements, for which the results of [12] apply, whereas there is no such identification of Nédélec edge and face elements in 3-D.

6 Conclusion

We have constructed a family of primal hybrid finite element methods for Maxwell’s equations, where the Lagrange multipliers enforcing inter-element continuity and boundary conditions correspond to a numerical trace \( {\widehat{H}} _h \) of the magnetic field and a numerical flux \( \widehat{ {D} } _h \) of the electric flux density. These methods strongly preserve the constraints \( {\text {div}} B _h = 0 \) and \( {\text {div}} \widehat{ {D} } _h = \rho \), the latter of which corresponds to conservation of charge. As a special case, these methods include hybridized versions of standard methods using curl-conforming edge elements, which had previously been thought only to be charge-conserving in a much weaker sense. We emphasize that these conservative properties hold even if the methods are not implemented in a hybrid fashion: If desired, \( {\widehat{H}} _h \) and \( \widehat{ {D} } _h \) may be recovered by an optional post-processing step.

There are several natural directions for future work. First, the numerical experiments in Sect. 5 focused on hybridized curl-conforming methods, due to the fact that their stability and error analysis are already well established. However, as mentioned in Remarks 8 and 11, this framework also includes constraint-preserving nonconforming methods, which would be interesting to investigate. Second, we do not yet have a complete explanation of the hybrid superconvergence phenomenon for \( {\widehat{H}} _h \rightarrow H \) in 2-D; this is the subject of ongoing work. Third, the techniques developed here might be applied to study constraint preservation in other families of hybrid methods, particularly hybridizable discontinuous Galerkin (HDG) methods. Finally, we have restricted our attention to problems where the current J is given, but it would be interesting to investigate the extension to problems in conducting materials, where J depends on the electric field.