1 Introduction

Since the early days of particle-in-cell (PIC) schemes, plasma physicists have devised variational algorithms based on least action principles to preserve key invariants such as the total energy and Gauss’s laws [16, 28, 29]. In parallel, a Hamiltonian structure of the Vlasov–Maxwell equations has been proposed, that involves a non-canonical Poisson bracket [31, 33, 39]. Although the first methods were developed for finite difference field solvers, many improvements have been made and in the last decade several schemes have been proposed that rely on the de Rham structure of the Maxwell equations [7, 22] to guarantee an exact preservation of proper discrete Gauss laws for general Finite Element PIC methods on general meshes [12], later extended to variational PIC schemes in e.g. [17, 36, 37], where it was shown that variational spectral methods also preserve the total momentum of the plasma.

Following these ideas a Geometric Electromagnetic PIC (GEMPIC) method based on spline finite elements has been proposed in [25], that possess a Hamiltonian structure relying on a discrete Poisson bracket. Coupled with Hamiltonian splitting methods [15, 20, 21], this approach leads to fully discrete schemes that preserve a modified energy, discrete Gauss laws, and the Poisson structure of the semi-discrete problem, including its associated Casimir invariants [25].

In this article, we extend these constructions to a flexible and general setting that allows for arbitrary structure-preserving discretizations of the electromagnetic fields and a variety of particle-field coupling operators which in particular includes almost arbitrary smoothing shape functions. By applying a discrete action principle we rigorously derive a variational system of discrete Vlasov–Maxwell equations, and we show that it has a non-canonical Poisson structure. This approach allows for instance to derive numerical Maxwell solvers with a strong Ampère and Gauss equation, and also extends the strong Faraday solver of [25] to more general particle-field coupling schemes. Another direct application is the design of variational spectral particle methods, where the Maxwell equations are solved in discrete Fourier spaces.

The outline of the paper is as follows. In Sect. 2 we first present the commuting de Rham complex that serves as the basis of our discrete derivation. This setting is now common in the structure-preserving (mimetic) discretization of Maxwell equations, and has been thoroughly studied in the Finite Element Exterior Calculus (FEEC) literature. For the Vlasov–Maxwell equations it describes how the particle-field coupling operators are connected with the differential operators involved in the discrete Maxwell equations. Then, we derive a variational particle discretization of the Vlasov–Maxwell system in a strong Ampère formulation from a discrete action principle, and analyze its main conservation properties together with its discrete Poisson structure. In Sect. 3, we present a variant of our method that preserves exactly the Gauss laws and the total momentum. In Sect. 4 a matrix form of the equations is carefully detailed, which also allows to derive a matrix form of the discrete Poisson bracket. In Sect. 5, we show how our analysis extends to a more general setting, and easily applies to the case of strong Faraday solvers. A detailed application to the case of structure-preserving Spline and Fourier discretizations is then presented in Sect. 6, with particle-field coupling operators based on geometric degrees of freedom which amount to discrete Fourier transforms in the spectral case. In Sect. 7, we conclude with preliminary numerical experiments that validate our approach and we compare the results obtained by various space discretizations that fit into our general framework, including different Maxwell solvers and different orders of particle smoothing.

2 Variational Particle-Field Discretization

2.1 Maxwell Equations and Particle Trajectories

A kinetic description of the dynamics of a plasma in an electromagnetic field \(({\varvec{E}}, {\varvec{B}})\) models the particles of species s by a distribution function \(f_s\) in phase-space that evolves according to the Vlasov equation

$$\begin{aligned} {\partial _{t}}f_s(t, {\varvec{x}}, {\varvec{v}}) + {\varvec{v}}\cdot \nabla _{\varvec{x}}f_s(t, {\varvec{x}}, {\varvec{v}}) + \frac{q_s}{m_s}\big ( {\varvec{E}}(t,{\varvec{x}}) + {\varvec{v}}\times {\varvec{B}}(t,{\varvec{x}}) \big ) \cdot \nabla _{\varvec{v}}f_s(t, {\varvec{x}}, {\varvec{v}}) = 0 \end{aligned}$$
(1)

where \(m_s\) and \(q_s\) denote the mass and charge of the particle species s. The self-consistent fields evolve according to Maxwell’s equations

$$\begin{aligned} \begin{aligned} {\partial _{t}}{\varvec{E}}(t, {\varvec{x}})&= {\mathrm{curl}}\, {\varvec{B}}(t, {\varvec{x}}) - {\varvec{J}}(t, {\varvec{x}}) \\ {\partial _{t}}{\varvec{B}}(t, {\varvec{x}})&= - {\mathrm{curl}}\, {\varvec{E}}(t, {\varvec{x}})\\ {\mathrm{div}}\, {\varvec{E}}(t, {\varvec{x}})&= \rho (t, {\varvec{x}}) \\ {\mathrm{div}}\, {\varvec{B}}(t, {\varvec{x}})&= 0 \end{aligned} \end{aligned}$$
(2)

which are coupled to the Vlasov equation through the charge and current densities,

$$\begin{aligned} \rho (t, {\varvec{x}}) = \sum _s q_s \int _{\mathbb {R}^3} f_s(t, {\varvec{x}}, {\varvec{v}}) \, {\mathrm{d}}{\varvec{v}}, \qquad {\varvec{J}}(t, {\varvec{x}}) = \sum _s q_s \int _{\mathbb {R}^3} {\varvec{v}}f_s(t, {\varvec{x}}, {\varvec{v}}) \, {\mathrm{d}}{\varvec{v}}. \end{aligned}$$
(3)

We refer to e.g. [5, 19] for a detailed presentation of these equations. As the Vlasov equation is a conservative transport equation, the distribution function \(f_s\) is constant over time along the characteristic trajectories for that species, which are solution to the characteristic ODEs

$$\begin{aligned} \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} {\varvec{X}}(t) = {\varvec{V}}(t), \qquad \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} {\varvec{V}}(t) = \frac{q_s}{m_s}\big ( {\varvec{E}}(t, {\varvec{X}}(t)) + {\varvec{V}}(t) \times {\varvec{B}}(t, {\varvec{X}}(t)) \big ) . \end{aligned}$$
(4)

For simplicity we will consider that these equations are posed in a periodic cube, but our approach also applies to bounded domains with homogeneous boundary conditions such as \({\varvec{E}}\times {\varvec{n}}= 0\) and \({\varvec{B}}\cdot {\varvec{n}}= 0\) which correspond to perfectly conducting boundaries, see Remark 2 below. Particles may either have no interactions with the boundary in the sense that (1)–(4) hold with no additional terms, or satisfy reflecting boundary conditions as is done in [34].

In particle methods the distribution function is often represented by a collection of N macro-particles with phase-space positions \(({\varvec{X}}_p, {\varvec{V}}_p)(t)\) and weights \(w_p\), of the form

$$\begin{aligned} f^S_{s,N}(t, {\varvec{x}}, {\varvec{v}}) = \sum _{p=1}^N w_p S({\varvec{x}}- {\varvec{X}}_p(t)) \delta ({\varvec{v}}- {\varvec{V}}_p(t)), \end{aligned}$$
(5)

where S is a shape function that can either by the Dirac \(\delta \) distribution or some smoothing kernel, depending on the particular configuration of the particle method. Starting from a collection of initial positions \(({\varvec{X}}_p^0, {\varvec{V}}_p^0)\), \(p = 1, \dots , N\), the weights are initialized so as to provide a good approximation to the initial density \(f^0_s\), and the particle positions are evolved according to some discrete characteristic equation, in order to approximate the trajectories (4). For the solution of Maxwell’s equations, a grid-based solver is commonly used.

2.2 Structure of Maxwell’s Equations and Finite Element Exterior Calculus

As has been evidenced by several key contributions in the last decades [6, 7, 22], the Maxwell equations (2) possess a geometric structure where a central role is played by de Rham sequence

$$\begin{aligned} H^1(\mathbb {R}^3) \xrightarrow { {~ {\mathrm{grad}}~} } H({\mathrm{curl}};\mathbb {R}^3) \xrightarrow { {~ {\mathrm{curl}}~}} H({\mathrm{div}};\mathbb {R}^3) \xrightarrow { {~ {\mathrm{div}}~}} L^2(\mathbb {R}^3). \end{aligned}$$
(6)

In order to derive structure-preserving schemes we will follow the framework of Finite Element Exterior Calculus (FEEC) developed in e.g. [2, 3, 10, 14, 22, 32]. A central feature of these approaches is to involve a discretization that preserves the sequence (6) at the discrete level, and that admits a sequence of projection operators \(\varPi ^0, \dots , \varPi ^3\) mapping infinite-dimensional function spaces into discrete ones:

(7)

In our framework, it is these operators \(\varPi ^\ell \), together with some shape (smoothing) functions S, that will encode the coupling mechanism between the particles and the discrete fields. Here the top row contains the infinite-dimensional domain spaces \(V^\ell \) of the operators \(\varPi ^\ell \), which are in general proper subsets of the natural Hilbert spaces involved in the sequence (6), and the bottom row consists of general discrete spaces such as finite-element or spectral spaces, see e.g. Sect. 6.

A key ingredient in our variational derivation will be that the operators \(\varPi ^\ell \) make the diagram commuting. In practice many choices can be made for these operators and the associated finite-element spaces where the fields are discretized. Each choice will result in a different coupling mechanism between the particles and the fields, but all of them will lead to Hamiltonian systems, provided the following property holds.

Assumption 1

The operators \(\varPi ^\ell : V^\ell \rightarrow V^\ell _h\) are such that:

  • the diagram (7) commutes, i.e., we have

    $$\begin{aligned} \varPi ^1 {\mathrm{grad}}\, G&= {\mathrm{grad}}\, \varPi ^0 G \quad&\text { for all } G \in V^0 \end{aligned}$$
    (8)
    $$\begin{aligned} \varPi ^2 {\mathrm{curl}}\, {\varvec{G}}&= {\mathrm{curl}}\, \varPi ^1 {\varvec{G}}\quad&\text { for all } {\varvec{G}}\in V^1 \end{aligned}$$
    (9)
    $$\begin{aligned} \varPi ^3 {\mathrm{div}}\, {\varvec{G}}&= {\mathrm{div}}\, \varPi ^2 {\varvec{G}}\quad&\text { for all } {\varvec{G}}\in V^2 \end{aligned}$$
    (10)
  • the domain spaces \(V^\ell \) are translation invariant function (or distribution) spaces, in the sense that if \(G \in V^0\), then \(G(\cdot - {\varvec{x}}) \in V^0\) for all \({\varvec{x}}\in \mathbb {R}^3\).

Since the commuting projection operators will be applied to particle shape functions, we also need to specify when these shapes are admissible.

Definition 1

(admissible shape functions) A shape function S is said to be admissible for a given sequence of operators \(\varPi ^\ell \) if it belongs to the domain spaces \(V^0\) and \(V^3\) of \(\varPi ^0\) and \(\varPi ^3\), and if for any \({\varvec{e}}\in \mathbb {R}^3\), \({\varvec{e}}S\) belongs to the domains \(V^1\) and \(V^2\) of \(\varPi ^1\) and \(\varPi ^2\).

Remark 1

In practice, the translation invariance assumption corresponds to defining the projection operators on domain spaces \(V^\ell \) characterized by some homogeneous regularity over \(\mathbb {R}^3\), which simplifies the notion of an admissible shape function S. In special cases where one works with localized or heterogeneous domain spaces, some additional care may need to be taken to guarantee that the projection operators can be applied on the shape functions.

2.3 Discretizing the Ampère or Faraday Equations in Strong Form

In the article [25] the discretization ansatz was to consider fields in the spaces

$$\begin{aligned} {\tilde{\phi }}_h \in V_h^0 \xrightarrow { {~ {\mathrm{grad}}~}} {\tilde{{\varvec{E}}}}_h, {\tilde{{\varvec{A}}}}_h \in V_h^1 \xrightarrow { {~ {\mathrm{curl}}~}} {\tilde{{\varvec{B}}}}_h \in V_h^2 \end{aligned}$$
(11)

with \({\tilde{\phi }}_h\) and \({\tilde{{\varvec{A}}}}_h\) denoting discrete representations of the scalar and vector potentials, and this has led to an approximation of Ampère’s and Faraday’s laws in weak and strong form, respectively. Although the analysis presented here readily applies to the ansatz (11), it also covers the dual choice

$$\begin{aligned} {\varvec{B}}_h \in V_h^1 \xrightarrow { {~ {\mathrm{curl}}~}} {\varvec{E}}_h,{\varvec{A}}_h \in V_h^2 \xrightarrow { {~ {\mathrm{div}}~}} \phi _h \in V_h^3 \end{aligned}$$
(12)

which leads to a new discrete model involving a strong Ampère law and a weak Faraday law. Throughout this article we will thus focus on this new ansatz (12), and describe in Sect. 5 how our results apply to the ‘strong Faraday’ ansatz (11).

In both cases, the discrete equations in weak form will involve the discrete adjoints to the strong differential operators. Assuming that the discrete spaces are equipped with an \(L^2\) scalar product on a cube \(\varOmega \) with periodic boundary conditions, the discrete weak operators read

$$\begin{aligned} \left\{ \begin{aligned}&{\mathrm{grad}}_w : V_h^3 \rightarrow V_h^2, \qquad \int _\varOmega ({\mathrm{grad}}_w \varphi _h)\cdot {\varvec{F}}_h = -\int _\varOmega \varphi _h {\mathrm{div}}\, {\varvec{F}}_h\\&{\mathrm{curl}}_w : V_h^2 \rightarrow V_h^1, \qquad \int _\varOmega ({\mathrm{curl}}_w {\varvec{F}}_h) \cdot {\varvec{C}}_h = \int _\varOmega {\varvec{F}}_h \cdot {\mathrm{curl}}\, {\varvec{C}}_h\\&{\mathrm{div}}_w : V_h^1 \rightarrow V_h^0, \qquad \int _\varOmega ({\mathrm{div}}_w {\varvec{C}}_h)\psi _h = -\int _\varOmega {\varvec{C}}_h \cdot {\mathrm{grad}}\, \psi _h \end{aligned} \right. \end{aligned}$$
(13)

for all \(\varphi _h \in V_h^3\), \({\varvec{F}}_h \in V_h^2\), \({\varvec{C}}_h \in V_h^1\) and \(\psi _h \in V_h^0\). These discrete operators may be seen as the discrete Riesz representants of the differential operators in distribution’s sense.

Remark 2

Defining the weak differential operators as in (13) makes sense in the absence of boundary terms. Within this article this is guaranteed by the periodic assumption, and in bounded domains it would correspond to homogeneous boundary conditions. Perfectly conducting boundaries for instance can be discretized strongly, i.e. as natural boundary conditions in the discrete spaces with the ansatz (11), whereas they need to be discretized weakly, i.e. as essential boundary conditions, with the ansatz (12).

2.4 Discrete Action Principle

We now derive a general geometric electromagnetic particle method where, following the ansatz (12), the Ampère equation is discretized in a strong sense. Here the coupling mechanism is essentially encoded in the abstract operators \(\varPi ^\ell \) that are only assumed to satisfy the commuting diagram properties, see Assumption 1, and in the shape function S that must be admissible in the sense of Definition 1.

To do so we follow a discrete variational principle in the spirit of [17, 24, 33, 37], based on Low’s Lagrangian functional for the Vlasov–Maxwell equations [30],

$$\begin{aligned} {\mathcal {L}}= & {} \sum _s \int _{\varOmega \times \mathbb {R}^3} f_s(t_0,{\varvec{z}}_0) \left( \big (m_s {\varvec{V}}+ q_s {\varvec{A}}(t,{\varvec{X}})\big )\cdot {\varvec{X}}' - \Big (\frac{m_s}{2}{\varvec{V}}^2 +q_s\phi (t,{\varvec{X}})\Big )\right) \, {\mathrm{d}}{\varvec{z}}_0 \nonumber \\&+\frac{1}{2} \int _{\varOmega } |{\mathrm{grad}}\,\phi (t,{\varvec{x}}) +{\varvec{A}}'(t,{\varvec{x}})|^2 \, {\mathrm{d}}{\varvec{x}}- \frac{1}{2}\int _{\varOmega } |{\mathrm{curl}}\, {\varvec{A}}(t,{\varvec{x}})|^2 \, {\mathrm{d}}{\varvec{x}}. \end{aligned}$$
(14)

Here the curves \({\varvec{X}}={\varvec{X}}(t;{\varvec{z}}_0)\), \({\varvec{X}}'={\varvec{X}}'(t;{\varvec{z}}_0)\), \({\varvec{V}}={\varvec{V}}(t;{\varvec{z}}_0)\) depend on time and on the initial condition \({\varvec{z}}_0= ({\varvec{x}}_0,{\varvec{v}}_0)\) in phase-space, and we recall that in a variational derivation they represent independent variables of the functional, in particular the prime symbol does not stand for a derivative. We also note that a different set of characteristics is associated to each particle species, which has been left implicit here for notational simplicity.

Formally, the Vlasov–Maxwell equations can be derived as the Euler–Lagrange equations associated with this Lagrangian, as shown in [30]. Here we will carefully apply this principle at the discrete level, starting from a discrete Lagrangian functional \( {\mathcal {L}}_h = {\mathcal {L}}_h({{\varvec{{\mathsf {X}}}}}_N, {{\varvec{{\mathsf {X}}}}}'_N, {{\varvec{{\mathsf {V}}}}}_N, {\varvec{A}}_h, {\varvec{A}}'_h, \phi _h), \) of the form

$$\begin{aligned} {\mathcal {L}}_h= & {} \sum _{p=1}^N w_p \left( \big (m_s {\varvec{V}}_p + q_s {\varvec{A}}^S({\varvec{X}}_p)\big )\cdot {\varvec{X}}'_p - \Big (\frac{m_s}{2}{\varvec{V}}^2_p +q_s\phi ^S({\varvec{X}}_p)\Big )\right) \nonumber \\&+\frac{1}{2} \int _{\varOmega } |{\mathrm{grad}}_w\phi _h({\varvec{x}}) +{\varvec{A}}'_h({\varvec{x}})|^2 \, {\mathrm{d}}{\varvec{x}}- \frac{1}{2}\int _{\varOmega } |{\mathrm{curl}}_w {\varvec{A}}_h({\varvec{x}})|^2 \, {\mathrm{d}}{\varvec{x}}. \end{aligned}$$
(15)

Here the discrete variables

$$\begin{aligned} {{\varvec{{\mathsf {X}}}}}_N = ({\varvec{X}}_p)_{1 \le p \le N}, \quad&{{\varvec{{\mathsf {X}}}}}'_N = ({\varvec{X}}'_p)_{1 \le p \le N}, \quad {{\varvec{{\mathsf {V}}}}}_N = ({\varvec{V}}_p)_{1 \le p \le N} \quad \in (\mathbb {R}^3)^N\\&{\varvec{A}}_h, ~ {\varvec{A}}'_h \in V_h^2, \qquad \phi _h \in V_h^3 \end{aligned}$$

are arbitrary collections of trajectories and finite element potential fields. We note that in (15) the dependence on t is implicit, as these variables will depend on time, but again we recall that the prime symbols do not denote a derivative, in the sense that all these variables are independent in the variational derivation. Finally the coupling potentials are defined as

$$\begin{aligned} \left\{ \begin{aligned}&{\varvec{A}}^S({\varvec{X}}_p) := \sum _{\alpha = 1}^3 {{\varvec{e}}}_\alpha \int _{\varOmega } \Big ( {\varvec{A}}_h \cdot \varPi ^2({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p})\Big ) \, {\mathrm{d}}{\varvec{x}},\\&\phi ^S({\varvec{X}}_p) := \int _{\varOmega } \Big ( \phi _h \varPi ^3(S_{{\varvec{X}}_p})\Big ) \, {\mathrm{d}}{\varvec{x}}\end{aligned} \right. \end{aligned}$$
(16)

where \(S_{{\varvec{X}}_p}({\varvec{x}}) = S({\varvec{x}}-{\varvec{X}}_p)\) denotes the shape function centered on a particle. We note that \({\mathcal {L}}_h\) is formally derived from the continuous functional (14) by (i) replacing the initial density \(f_s\) by its Dirac approximation in (5), i.e., \( f^\delta _{s,N}(t^0, {\varvec{x}}^0, {\varvec{v}}^0) = \sum _{p=1}^N w_p \delta ({\varvec{x}}^0 - {\varvec{X}}^0_p)\delta ({\varvec{v}}^0 - {\varvec{V}}^0_p), \) (ii) using trajectories satisfying \(({\varvec{X}},{\varvec{V}})(t; {\varvec{X}}^0_p, {\varvec{V}}^0_p) = ({\varvec{X}}_p, {\varvec{V}}_p)(t)\), (iii) potential fields in the discrete (finite element) spaces, (iv) weak discrete differentials (13) instead of the exact ones, and finally (v) the coupling fields (16) defined with admissible shape (smoothing) functions in (5). In the case of several species, each density \(f_s\) is approximated by a different set of discrete particles, so that we actually have \(s = s(p)\) in (15). For this reason it will be convenient to denote in the sequel particle masses and charges by

$$\begin{aligned} m_p := w_p m_{s(p)} \qquad \text { and } \qquad q_p := w_p q_{s(p)}, \qquad \text { for } ~~ p = 1, \dots , N. \end{aligned}$$
(17)

The discrete Action functional is then defined as

$$\begin{aligned} {\mathcal {S}}_h({{\varvec{{\mathsf {X}}}}}_N, {{\varvec{{\mathsf {V}}}}}_N, \phi _h, {\varvec{A}}_h) := \int _{0}^{T} {\mathcal {L}}_h\big (({{\varvec{{\mathsf {X}}}}}_N, \tfrac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} {{{\varvec{{\mathsf {X}}}}}_N},{{\varvec{{\mathsf {V}}}}}_N,\phi _h, {\varvec{A}}_h, {\partial _{t}}{\varvec{A}}_h)(t)\big ) \, {\mathrm{d}}t \end{aligned}$$
(18)

and following a discrete action principle we look for generalized trajectories that form an extremum of \({\mathcal {S}}_h\). We already point out that the resulting equations will only involve the fields

$$\begin{aligned} {\varvec{E}}_h := - {\partial _{t}}{\varvec{A}}_h - {\mathrm{grad}}_w \phi _h \in V^2_h \qquad \text { and } \qquad {\varvec{B}}_h := {\mathrm{curl}}_w {\varvec{A}}_h \in V^1_h, \end{aligned}$$
(19)

hence they will be gauge-independent. Formally, extremality conditions for \({\mathcal {S}}_h\) are associated to the Euler–Lagrange equations of the discrete Lagrangian functional (15). Thus we look for \({{\varvec{{\mathsf {X}}}}}_N\), \({{\varvec{{\mathsf {V}}}}}_N\), \(\phi _h\), and \({\varvec{A}}_h\) such that the following relations hold for all \(t \in [0,T]\), with functional Gateaux derivatives evaluated at \(({{\varvec{{\mathsf {X}}}}}_N, {{\varvec{{\mathsf {X}}}}}'_N, {{\varvec{{\mathsf {V}}}}}_N, \phi _h, {\varvec{A}}_h, {\varvec{A}}'_h) = ({{\varvec{{\mathsf {X}}}}}_N, \tfrac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} {{\varvec{{\mathsf {X}}}}}_N, {{\varvec{{\mathsf {V}}}}}_N, \phi _h, {\varvec{A}}_h, {\partial _{t}}{\varvec{A}}_h)\):

$$\begin{aligned}&\Big \langle \frac{\delta {\mathcal {L}}_h}{\delta {{\varvec{{\mathsf {V}}}}}_N},\check{{{\varvec{{\mathsf {V}}}}}}_N\Big \rangle = 0,&\forall ~\check{{{\varvec{{\mathsf {V}}}}}}_N \in \mathbb {R}^{3N} \end{aligned}$$
(20)
$$\begin{aligned}&\Big \langle \frac{\delta {\mathcal {L}}_h}{\delta {{\varvec{{\mathsf {X}}}}}_N},\check{{{\varvec{{\mathsf {X}}}}}}_N\Big \rangle = \Big \langle \frac{\partial }{\partial t}\frac{\delta {\mathcal {L}}_h}{\delta {{\varvec{{\mathsf {X}}}}}_N'},\check{{{\varvec{{\mathsf {X}}}}}}_N\Big \rangle ,&\forall ~ \check{{{\varvec{{\mathsf {X}}}}}}_N \in \mathbb {R}^{3N} \end{aligned}$$
(21)
$$\begin{aligned}&\Big \langle \frac{\delta {\mathcal {L}}_h}{\delta \phi _h},\check{\psi }_h\Big \rangle = 0,&\forall ~\check{\psi }_h \in V_h^3 \end{aligned}$$
(22)
$$\begin{aligned}&\Big \langle \frac{\delta {\mathcal {L}}_h}{\delta {\varvec{A}}_h},\check{{\varvec{A}}}_h\Big \rangle = \Big \langle \frac{\partial }{\partial t}\frac{\delta {\mathcal {L}}_h}{\delta {\varvec{A}}_h'},\check{{\varvec{A}}}_h\Big \rangle ,&\forall ~ \check{{\varvec{A}}}_h \in V_h^2. \end{aligned}$$
(23)

For the variations with respect to \({{\varvec{{\mathsf {V}}}}}_N\), we compute

$$\begin{aligned} \Big \langle \frac{\delta {\mathcal {L}}_h}{\delta {{\varvec{{\mathsf {V}}}}}_N},\check{{{\varvec{{\mathsf {V}}}}}}_N\Big \rangle := \left. \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}\epsilon }\right| _{\epsilon =0} \Big ({\mathcal {L}}_h({{\varvec{{\mathsf {X}}}}}_N, \tfrac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} {{\varvec{{\mathsf {X}}}}}_N,{{\varvec{{\mathsf {V}}}}}_N+\epsilon \check{{{\varvec{{\mathsf {V}}}}}}_N, \phi _h, {\varvec{A}}_h)\Big ) = \sum _{p} m_p \Big (\frac{\, {\mathrm{d}}{\varvec{X}}_p}{\, {\mathrm{d}}t} -{\varvec{V}}_p\Big ) \cdot \check{{\varvec{V}}}_p \end{aligned}$$

for an arbitrary \(\check{{{\varvec{{\mathsf {V}}}}}}_N = (\check{{\varvec{V}}}_p)_{p = 1, \dots , N}\), so that (20) gives

$$\begin{aligned} \frac{\, {\mathrm{d}}{\varvec{X}}_p}{\, {\mathrm{d}}t} = {\varvec{V}}_p \qquad \qquad \text {for } p = 1, \ldots , N. \end{aligned}$$
(24)

Using the coupling potentials (16), we compute for the variations with respect to \({{\varvec{{\mathsf {X}}}}}_N\)

$$\begin{aligned} \left\{ \begin{aligned}&\Big \langle \frac{\delta {\mathcal {L}}_h}{\delta {{\varvec{{\mathsf {X}}}}}'_N},\check{{{\varvec{{\mathsf {X}}}}}}_N\Big \rangle = \sum _{p} \big (m_p {\varvec{V}}_p + q_p {\varvec{A}}^S(t,{\varvec{X}}_p)\big ) \cdot \check{{\varvec{X}}}_p = \sum _{p} m_p {\varvec{V}}_p \cdot \check{{\varvec{X}}}_p + q_p \int _{\varOmega } {\varvec{A}}_h \cdot \varPi ^2(\check{{\varvec{X}}}_p S_{{\varvec{X}}_p})\\&\Big \langle \frac{\delta {\mathcal {L}}_h}{\delta {{\varvec{{\mathsf {X}}}}}_N},\check{{{\varvec{{\mathsf {X}}}}}}_N\Big \rangle = -\sum _{p} q_p \int _{\varOmega } \Big ( {\varvec{A}}_h \cdot \varPi ^2({\varvec{V}}_p (\check{{\varvec{X}}}_p \cdot {\mathrm{grad}}\, S_{{\varvec{X}}_p})) - \phi _h \varPi ^3 (\check{{\varvec{X}}}_p \cdot {\mathrm{grad}}\, S_{{\varvec{X}}_p}) \Big ) \end{aligned}\right. \end{aligned}$$
(25)

for an arbitrary \(\check{{{\varvec{{\mathsf {X}}}}}}_N = (\check{{\varvec{X}}}_p)_{p = 1, \ldots , N}\). We then write Eq. (21) for a variation of a single particle \(1 \le p \le N\) along the unit basis vector \({{\varvec{e}}}_\alpha \in \mathbb {R}^3\) for some dimension \(1\le \alpha \le 3\). Thus we take \(\check{{\varvec{X}}}_{p'} = \delta _{p',p} {{\varvec{e}}}_\alpha \), which gives

$$\begin{aligned} \begin{aligned} \frac{m_p}{q_p} \frac{\, {\mathrm{d}}{\varvec{V}}_p }{\, {\mathrm{d}}t} \cdot {{\varvec{e}}}_\alpha&= \int _{\varOmega } {\varvec{A}}_h \cdot \varPi ^2\big ({{\varvec{e}}}_\alpha ({\varvec{V}}_p \cdot \! {\mathrm{grad}}\, S_{{\varvec{X}}_p}) - {\varvec{V}}_p ({{\varvec{e}}}_\alpha \cdot \! {\mathrm{grad}}\, S_{{\varvec{X}}_p})\big ) \\&\quad - \int _{\varOmega } {\partial _{t}}{\varvec{A}}_h \cdot \varPi ^2({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p}) + \int _{\varOmega } \phi _h \varPi ^3 ({{\varvec{e}}}_\alpha \cdot \! {\mathrm{grad}}\, S_{{\varvec{X}}_p}) \\&= \int _{\varOmega } {\varvec{A}}_h \cdot \varPi ^2 {\mathrm{curl}}\, ({{\varvec{e}}}_\alpha \times {\varvec{V}}_p S_{{\varvec{X}}_p}) - \int _{\varOmega } {\partial _{t}}{\varvec{A}}_h \cdot \varPi ^2({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p})\\&\quad + \int _{\varOmega } \phi _h \varPi ^3 {\mathrm{div}}\, ({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p}) \\&= \int _{\varOmega } {\varvec{A}}_h \cdot {\mathrm{curl}}\, \varPi ^1 ({{\varvec{e}}}_\alpha \times {\varvec{V}}_p S_{{\varvec{X}}_p}) - \int _{\varOmega } {\partial _{t}}{\varvec{A}}_h \cdot \varPi ^2({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p})\\&\quad + \int _{\varOmega } \phi _h {\mathrm{div}}\, \varPi ^2 ({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p}) \\&= \int _{\varOmega } {\mathrm{curl}}_w {\varvec{A}}_h \cdot \varPi ^1 ({{\varvec{e}}}_\alpha \times {\varvec{V}}_p S_{{\varvec{X}}_p}) - \int _{\varOmega } ({\partial _{t}}{\varvec{A}}_h + {\mathrm{grad}}_w \phi _h) \cdot \varPi ^2({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p}) \\&= \int _{\varOmega } {\varvec{B}}_h \cdot \varPi ^1 ({{\varvec{e}}}_\alpha \times {\varvec{V}}_p S_{{\varvec{X}}_p}) + \int _{\varOmega } {\varvec{E}}_h \cdot \varPi ^2({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p}) \end{aligned} \end{aligned}$$

where we have used the commuting diagram property (8)–(10) of the operators \(\varPi ^\ell \), and the definition (19) of the fields in the last equality. Using the linearity of the projection operator we rewrite the magnetic rotation term as

$$\begin{aligned} \int _{\varOmega } {\varvec{B}}_h \cdot \varPi ^1 ({{\varvec{e}}}_\alpha \times {\varvec{V}}_p S_{{\varvec{X}}_p}) = \sum _{\beta = 1}^{3} ({{\varvec{e}}}_\alpha \times {\varvec{V}}_p)_\beta \int _{\varOmega } {\varvec{B}}_h \cdot \varPi ^1 ({{\varvec{e}}}_\beta S_{{\varvec{X}}_p}) = \big ({\varvec{V}}_p \times {\varvec{B}}^S({\varvec{X}}_p)\big ) \cdot {{\varvec{e}}}_\alpha \end{aligned}$$
(26)

with a coupling magnetic field defined at the particle position as

$$\begin{aligned} {\varvec{B}}^S({\varvec{X}}_p) := \sum _{\alpha = 1}^3 {{\varvec{e}}}_\alpha \int _{\varOmega } {\varvec{B}}_h({\varvec{x}}) \cdot \varPi ^1({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p})({\varvec{x}}) \, {\mathrm{d}}{\varvec{x}}. \end{aligned}$$
(27)

Defining similarly the coupling electric field by

$$\begin{aligned} {\varvec{E}}^S ({\varvec{X}}_p) := \sum _{\alpha = 1}^3 {{\varvec{e}}}_\alpha \int _{\varOmega } {\varvec{E}}_h({\varvec{x}}) \cdot \varPi ^2({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p})({\varvec{x}}) \, {\mathrm{d}}{\varvec{x}}\end{aligned}$$
(28)

we arrive at a velocity equation of the form

$$\begin{aligned} \frac{\, {\mathrm{d}}{\varvec{V}}_p }{\, {\mathrm{d}}t} = \frac{q_p}{m_p} \Big ({\varvec{E}}^S ({\varvec{X}}_p) + {\varvec{V}}_p \times {\varvec{B}}^S({\varvec{X}}_p)\Big ). \end{aligned}$$
(29)

Turning to the variations with respect to \({\varvec{A}}_h\), using again (16) we compute

$$\begin{aligned} \left\{ \begin{aligned}&\Big \langle \frac{\delta {\mathcal {L}}_h}{\delta {\varvec{A}}_h},\check{{\varvec{A}}}_h\Big \rangle = \sum _{p} q_p \int _{\varOmega } \varPi ^2({\varvec{V}}_p S_{{\varvec{X}}_p}) \cdot \check{{\varvec{A}}}_h - \int _{\varOmega } ({\mathrm{curl}}_w {\varvec{A}}_h)\cdot ({\mathrm{curl}}_w \check{{\varvec{A}}}_h) \\&\Big \langle \frac{\delta {\mathcal {L}}_h}{\delta {\varvec{A}}_h'},\check{{\varvec{A}}}_h\Big \rangle = \int _{\varOmega }({\partial _{t}}{\varvec{A}}_h+{\mathrm{grad}}_w\phi _h)\cdot \check{{\varvec{A}}}_h \end{aligned} \right. \end{aligned}$$
(30)

so that Eq. (23) gives

$$\begin{aligned} \int _{\varOmega } {\partial _{t}}({\partial _{t}}{\varvec{A}}_h+{\mathrm{grad}}_w\phi _h)\cdot \check{{\varvec{A}}}_h + \int _{\varOmega } ({\mathrm{curl}}_w {\varvec{A}}_h)\cdot ({\mathrm{curl}}_w \check{{\varvec{A}}}_h) = \sum _{p} q_p \int _{\varOmega } \varPi ^2({\varvec{V}}_p S_{{\varvec{X}}_p}) \cdot \check{{\varvec{A}}}_h. \end{aligned}$$

The latter can be rewritten only in terms of the fields (19) and the particle current defined as

$$\begin{aligned} {\varvec{J}}^S_N(t,{\varvec{x}}) := \sum _s q_s \int _{\mathbb {R}^3} {\varvec{v}}f^S_{s,N}(t, {\varvec{x}}, {\varvec{v}}) \, {\mathrm{d}}{\varvec{v}}= \sum _{p} q_p {\varvec{V}}_p S_{{\varvec{X}}_p(t)}({\varvec{x}}), \end{aligned}$$

see (5) and (17), as

$$\begin{aligned} - \int _{\varOmega } {\partial _{t}}{\varvec{E}}_h \cdot \check{{\varvec{A}}}_h + \int _{\varOmega } {\mathrm{curl}}\, {\varvec{B}}_h \cdot \check{{\varvec{A}}}_h = \int _{\varOmega } \big (\varPi ^2 {\varvec{J}}_N^S\big ) \cdot \check{{\varvec{A}}}_h \end{aligned}$$
(31)

where we have used again the definition of the weak operators (13). Since both \(-{\partial _{t}}{\varvec{E}}_h + {\mathrm{curl}}\, {\varvec{B}}_h\) and \(\varPi ^2 {\varvec{J}}_N^S\) belong to \(V_h^2\), and (31) holds for all \(\check{{\varvec{A}}}_h \in V_h^2\), it leads to an Ampère equation in strong form,

$$\begin{aligned} - {\partial _{t}}{\varvec{E}}_h + {\mathrm{curl}}\, {\varvec{B}}_h = \varPi ^2 {\varvec{J}}^S_N. \end{aligned}$$
(32)

In turn, a weak Faraday equation involving the discrete curl (13),

$$\begin{aligned} {\partial _{t}}{\varvec{B}}_h + {\mathrm{curl}}_w {\varvec{E}}_h = 0 \end{aligned}$$
(33)

follows from the definition of the fields (19): Indeed, for all \(\check{{\varvec{B}}}_h \in V_h^1\) we have

$$\begin{aligned} \int _{\varOmega } {\partial _{t}}{\varvec{B}}_h \cdot \check{{\varvec{B}}}_h = \int _{\varOmega } {\partial _{t}}{\varvec{A}}_h \cdot {\mathrm{curl}}\, \check{{\varvec{B}}}_h = -\int _{\varOmega } ({\varvec{E}}_h + {\mathrm{grad}}_w \phi _h )\cdot {\mathrm{curl}}\, \check{{\varvec{B}}}_h = - \int _{\varOmega } {\varvec{E}}_h \cdot {\mathrm{curl}}\, \check{{\varvec{B}}}_h \end{aligned}$$

and hence (33), by using that \(\int _{\varOmega } {\mathrm{grad}}_w \phi _h \cdot {\mathrm{curl}}\, \check{{\varvec{B}}}_h = \int _{\varOmega } \phi _h {\mathrm{div}}\, {\mathrm{curl}}\, \check{{\varvec{B}}}_h = 0\). For the variations with respect to \(\phi _h\) we use once more (16) and compute

$$\begin{aligned} \Big \langle \frac{\delta {\mathcal {L}}_h}{\delta \phi _h},\check{\phi }_h\Big \rangle = - \sum _{p} q_p \int _{\varOmega } (\varPi ^3 S_{{\varvec{X}}_p})\check{\phi }_h + \int _{\varOmega } ({\partial _{t}}{\varvec{A}}_h+{\mathrm{grad}}_w\phi _h) \cdot {\mathrm{grad}}_w \check{\phi }_h \end{aligned}$$

for an arbitrary \(\check{\phi }_h \in V_h^3\), so that (22) gives

$$\begin{aligned} \int _{\varOmega } ( {\partial _{t}}{\varvec{A}}_h + {\mathrm{grad}}_w \phi _h ) \cdot {\mathrm{grad}}_w \check{\phi }_h = \sum _{p} q_p \int _{\varOmega } (\varPi ^3 S_{{\varvec{X}}_p})\check{\phi }_h. \end{aligned}$$
(34)

Using the field \({\varvec{E}}_h\) defined in (19) and noting that (34) must hold for all \(\check{\phi }_h \in V_h^3\), we arrive at a Gauss law in strong form,

$$\begin{aligned} \begin{aligned}&{\mathrm{div}}\, {\varvec{E}}_h = \varPi ^3 \rho ^S_N\\&\text { with } \qquad \rho ^S_N(t,{\varvec{x}}) := \sum _s q_s \int _{\mathbb {R}^3} f^S_{s,N}(t, {\varvec{x}}, {\varvec{v}}) \, {\mathrm{d}}{\varvec{v}}= \sum _{p=1}^N q_p S_{{\varvec{X}}_p(t)}({\varvec{x}}), \end{aligned} \end{aligned}$$
(35)

see again (5), (17). Finally a discrete magnetic Gauss law, this time in weak form, follows again from the definition (19) of \({\varvec{B}}_h = {\mathrm{curl}}_w {\varvec{A}}_h\), writing that

$$\begin{aligned} \int _{\varOmega } ({\mathrm{div}}_w {\varvec{B}}_h ) \psi _h \!=\! - \int _{\varOmega } {\varvec{B}}_h \cdot {\mathrm{grad}}\, \psi _h \!=\! -\int _{\varOmega } {\varvec{A}}_h \cdot {\mathrm{curl}}\, {\mathrm{grad}}\, \psi _h \!=\! 0 \qquad \forall \psi _h \in V_h^0. \end{aligned}$$
(36)

2.5 The Variational Equations

Gathering the findings of the variational derivation just detailed, we obtain a system of semi-discrete equations where the fields \({\varvec{E}}_h = {\varvec{E}}_h(t) \in V_h^2\) and \({\varvec{B}}_h = {\varvec{B}}_h(t) \in V_h^1\) are governed by the discrete Ampère and Faraday equations

$$\begin{aligned} \left\{ \begin{aligned} -&{\partial _{t}}{\varvec{E}}_h + {\mathrm{curl}}\, {\varvec{B}}_h = \varPi ^2 {\varvec{J}}^S_N \\&{\partial _{t}}{\varvec{B}}_h + {\mathrm{curl}}_w {\varvec{E}}_h = 0 \end{aligned} \right. \qquad \text { with } \qquad \varPi ^2 {\varvec{J}}^S_N = \sum _{p = 1 \ldots N} q_p \varPi ^2( {\varvec{V}}_p S_{{\varvec{X}}_p}) \end{aligned}$$
(37)

with a weak \({\mathrm{curl}}_w : V_h^2 \rightarrow V_h^1\) defined by (13), and particles follow the trajectory equations

$$\begin{aligned} \left\{ \begin{aligned}&\frac{\, {\mathrm{d}}{\varvec{X}}_p}{\, {\mathrm{d}}t} = {\varvec{V}}_p \\&\frac{\, {\mathrm{d}}{\varvec{V}}_p}{\, {\mathrm{d}}t} = \frac{q_p}{m_p} \big ({\varvec{E}}^S({\varvec{X}}_p) + {\varvec{V}}_p \times {\varvec{B}}^S({\varvec{X}}_p)\big ) \end{aligned} \right. \qquad \text { for } p = 1, \dots , N \end{aligned}$$
(38)

with coupling fields defined by (27)–(28), namely

$$\begin{aligned} {\varvec{E}}^S({\varvec{X}}_p) \!=\! \sum _{\alpha =1}^3 {{\varvec{e}}}_\alpha \int _{\varOmega } {\varvec{E}}_h \cdot \varPi ^2({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p}), \qquad {\varvec{B}}^S({\varvec{X}}_p) \!=\! \sum _{\alpha =1}^3 {{\varvec{e}}}_\alpha \int _{\varOmega } {\varvec{B}}_h \cdot \varPi ^1({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p}) \end{aligned}$$
(39)

where \(({{\varvec{e}}}_1, {{\varvec{e}}}_2, {{\varvec{e}}}_3)\) is an orthonormal basis of \(\mathbb {R}^3\). These evolution equations are completed with two discrete Gauss laws,

$$\begin{aligned} \left\{ \begin{aligned}&{\mathrm{div}}\, {\varvec{E}}_h = \varPi ^3 \rho ^S_N \\&{\mathrm{div}}_w {\varvec{B}}_h = 0 \end{aligned} \right. \end{aligned}$$
(40)

with \(\rho ^S_N = \sum _{p=1}^N q_p S_{{\varvec{X}}_p}\) and the weak divergence operator \({\mathrm{div}}_w : V_h^1 \rightarrow V_h^0\) defined by (13). We note that here the first Gauss law has been derived from the variational principle (considering variations in the electric potential), whereas the second one follows from the definition of the magnetic field.

2.6 Derivation of a Discrete Hamiltonian and an Associated Poisson Bracket

In this section we describe how the above variational equations can be associated with a discrete Poisson bracket.

Following Hamilton’s method [20,  Sec. VI.1.2], we observe that our discrete Lagrangian has two nonzero conjugate momenta given by (25) and (30), which we may identify with their Riesz representant in the proper spaces. Assuming that the discrete solution satisfies the variational Eqs. (37)–(40), we have

$$\begin{aligned} P_{{{\varvec{{\mathsf {X}}}}}_N} := \frac{\delta {\mathcal {L}}_h}{\delta {{\varvec{{\mathsf {X}}}}}'_N} \equiv \big (m_p {\varvec{V}}_p + q_p {\varvec{A}}^S(t,{\varvec{X}}_p)\big )_{p=1, \dots , N} \qquad \text { and } \qquad P_{{\varvec{A}}_h} := \frac{\delta {\mathcal {L}}_h}{\delta {\varvec{A}}'_h} \equiv - {\varvec{E}}_h \end{aligned}$$

which allows to define a discrete Hamiltonian \({\mathcal {H}}_h = {\mathcal {H}}_h({{\varvec{{\mathsf {X}}}}}_N, {{\varvec{{\mathsf {V}}}}}_N, {\varvec{A}}_h, \phi _h)\) as

$$\begin{aligned} \begin{aligned} {\mathcal {H}}_h&:= \big \langle P_{{{\varvec{{\mathsf {X}}}}}_N},{{\varvec{{\mathsf {V}}}}}_N\big \rangle + \big \langle P_{{\varvec{A}}_h},{\partial _{t}}{\varvec{A}}_h\big \rangle - {\mathcal {L}}_h \\&= \sum _{p=1}^N \big (m_p {\varvec{V}}_p + q_p {\varvec{A}}^S(t,{\varvec{X}}_p)\big ) \cdot {\varvec{V}}_p - \int _{\varOmega } {\varvec{E}}_h \cdot {\partial _{t}}{\varvec{A}}_h - {\mathcal {L}}_h. \end{aligned} \end{aligned}$$

Using the form of the coupling potential (16) and the variational Gauss law (40) we have

$$\begin{aligned} \sum _p q_p \phi ^S({\varvec{X}}_p) \!=\! \int _\varOmega \phi _h \sum _p q_p \varPi ^3(S_{{\varvec{X}}_p}) \!=\! \int _\varOmega \phi _h \rho ^S_N = \int _\varOmega \phi _h {\mathrm{div}}\, {\varvec{E}}_h \!=\! -\int _\varOmega {\varvec{E}}_h \cdot {\mathrm{grad}}_w \phi _h, \end{aligned}$$

so that the resulting Hamiltonian can be reformulated as a function of the fields (19), namely

$$\begin{aligned} {\mathcal {H}}_h({{\varvec{{\mathsf {X}}}}}_N, {{\varvec{{\mathsf {V}}}}}_N, {\varvec{E}}_h, {\varvec{B}}_h) = \sum _{p=1}^N \frac{m_p}{2}{\varvec{V}}^2_p + \frac{1}{2} \int _{\varOmega } |{\varvec{E}}_h|^2 \, {\mathrm{d}}{\varvec{x}}+ \frac{1}{2} \int _{\varOmega } |{\varvec{B}}_h|^2 \, {\mathrm{d}}{\varvec{x}}. \end{aligned}$$
(41)

By construction this Hamiltonian is preserved by any solution satisfying the Euler–Lagrange equations (20)–(23). Following [4,  Sec. 40-A], a discrete Poisson bracket \(\{{\mathcal {F}}_h, {\mathcal {G}}_h\}\) can then be associated to the evolution Eqs. (37)–(39), such that

$$\begin{aligned} \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} {\mathcal {F}}_h({{\varvec{{\mathsf {X}}}}}_N, {{\varvec{{\mathsf {V}}}}}_N, {\varvec{E}}_h, {\varvec{B}}_h) = \{{\mathcal {F}}_h,{\mathcal {H}}_h\} \end{aligned}$$
(42)

holds for an arbitrary functional \({\mathcal {F}}_h\) of the discrete solution. To identify this bracket we may simply consider linear functionals of the form defined by

$$\begin{aligned} {\mathcal {F}}_h= & {} {\mathcal {F}}_{\check{{{\varvec{{\mathsf {X}}}}}}_N,\check{{{\varvec{{\mathsf {V}}}}}}_N,\check{{\varvec{E}}}_h,\check{{\varvec{B}}}_h} : ({{\varvec{{\mathsf {X}}}}}_N,{{\varvec{{\mathsf {V}}}}}_N,{\varvec{E}}_h,{\varvec{B}}_h)\\\mapsto & {} \sum _{p=1}^N {\varvec{X}}_p \cdot \check{{\varvec{X}}}_p + {\varvec{V}}_p \cdot \check{{\varvec{V}}}_p + \int _\varOmega {\varvec{E}}_h \cdot \check{{\varvec{E}}}_h + \int _\varOmega {\varvec{B}}_h \cdot \check{{\varvec{B}}}_h, \end{aligned}$$

and \({\mathcal {G}}_h = {\mathcal {H}}_h\). Since the Poisson bracket should be a bilinear antisymmetric expression of the derivatives of its respective functionals, which read (upon identification with their proper discrete Riesz representant)

$$\begin{aligned} \frac{\delta {\mathcal {F}}_h}{\delta {\varvec{X}}_p} = \check{{\varvec{X}}}_p, \quad \frac{\delta {\mathcal {F}}_h}{\delta {\varvec{V}}_p} = \check{{\varvec{V}}}_p, \quad \frac{\delta {\mathcal {F}}_h}{\delta {\varvec{E}}_h} = \check{{\varvec{E}}}_h, \quad \frac{\delta {\mathcal {F}}_h}{\delta {\varvec{B}}_h} = \check{{\varvec{B}}}_h \end{aligned}$$

and (for \({\mathcal {G}}_h = {\mathcal {H}}_h\)),

$$\begin{aligned} \frac{\delta {\mathcal {G}}_h}{\delta {\varvec{X}}_p} = 0, \quad \frac{\delta {\mathcal {G}}_h}{\delta {\varvec{V}}_p} = m_p {\varvec{V}}_p, \quad \frac{\delta {\mathcal {G}}_h}{\delta {\varvec{E}}_h} = {\varvec{E}}_h, \quad \frac{\delta {\mathcal {G}}_h}{\delta {\varvec{B}}_h} = {\varvec{B}}_h, \end{aligned}$$

and observing by linearity of \({\mathcal {F}}\) that (42) just amounts to the evolution Eqs. (37)–(39) written in weak forms, with \(\check{{{\varvec{{\mathsf {X}}}}}}_N,\check{{{\varvec{{\mathsf {V}}}}}}_N,\check{{\varvec{E}}}_h,\check{{\varvec{B}}}_h\) as test fields, we verify that (42) holds with the following discrete bracket

$$\begin{aligned} {\left\{ {\mathcal {F}}_h , {\mathcal {G}}_h \right\} }= & {} \sum _{p=1}^N \Bigg [ \frac{1}{m_p}\left( \frac{\delta {\mathcal {F}}_h}{\delta {\varvec{X}}_p}\cdot \frac{\delta {\mathcal {G}}_h}{\delta {\varvec{V}}_p}- \frac{\delta {\mathcal {F}}_h}{\delta {\varvec{V}}_p} \cdot \frac{\delta {\mathcal {G}}_h}{\delta {\varvec{X}}_p}\right) + \frac{q_p}{m_p^2}{\varvec{B}}^S({\varvec{X}}_p)\cdot \Big (\frac{\delta {\mathcal {F}}_h}{\delta {\varvec{V}}_p}\times \frac{\delta {\mathcal {G}}_h}{\delta {\varvec{V}}_p}\Big ) \nonumber \\&+ \frac{q_p}{m_p} \int _\varOmega \left( \varPi ^2 \left( S_{{\varvec{X}}_p}\frac{\delta {\mathcal {F}}_h}{\delta {\varvec{V}}_p}\right) \cdot \frac{\delta {\mathcal {G}}_h}{\delta {\varvec{E}}_h} - \frac{\delta {\mathcal {F}}_h}{\delta {\varvec{E}}_h}\cdot \varPi ^2\left( S_{{\varvec{X}}_p}\frac{\delta {\mathcal {G}}_h}{\delta {\varvec{V}}_p}\right) \right) \, {\mathrm{d}}{\varvec{x}}\Bigg ] \nonumber \\&+ \int _\varOmega \left( \frac{\delta {\mathcal {F}}_h}{\delta {\varvec{E}}_h} \cdot {\mathrm{curl}}\,\frac{\delta {\mathcal {G}}_h}{\delta {\varvec{B}}_h} - {\mathrm{curl}}\,\frac{\delta {\mathcal {F}}_h}{\delta {\varvec{B}}_h} \cdot \frac{\delta {\mathcal {G}}_h}{\delta {\varvec{E}}_h}\right) \, {\mathrm{d}}{\varvec{x}}\end{aligned}$$
(43)

where we remind that the coupling magnetic field \({\varvec{B}}^S({\varvec{X}}_p)\) is defined in (39) and involves the projection operator \(\varPi ^1\). We observe that this field appears explicitely in the bracket as do the shape functions centered on the particle positions, \(S_{{\varvec{X}}_p}\). A different role is played by the coupling electric field \({\varvec{E}}^S({\varvec{X}}_p)\) and current \(\varPi ^2 {\varvec{J}}^S_N\), which enter the bracket through the product of \({\varvec{V}}\)\({\varvec{E}}\) derivatives.

Below we will verify that this bracket is a (non-canonical) Poisson bracket in the sense of [20,  Def. VII.2.4], in particular it satisfies the Jacobi identity. We note that other brackets involving different coupling fields \({\varvec{B}}^S\) would still be antisymmetric, and hence also energy-preserving. As the different projection operators are connected by the commuting diagram properties which have been used in several steps of the least action principle derivation, such brackets would probably not be variational, but they could maybe still satisfy the Jacobi identity.

2.7 Semi-discrete Conservation Properties of the Variational System

One major property of the above derivation is that the resulting semi-discrete system has a Poisson structure, under the very general assumption that the diagram (7) is commuting.

Theorem 1

If the operators \(\varPi ^\ell \) satisfy Assumption 1 and if the shape function S is admissible in the sense of Definition 1, then the discrete bracket (43) is a (non-canonical) Poisson bracket and the semi-discrete equations (37)–(39) are a Poisson system in the sense of [20,  Def. VII.2.4].

This result, whose proof will be given in Sect. 4.3, implies in particular that the evolution Eqs. (37)–(39) preserve all the functionals \({\mathcal {F}}_h\) such that

$$\begin{aligned} \{{\mathcal {F}}_h, {\mathcal {H}}_h\} = 0, \end{aligned}$$

which includes the Hamiltonian itself, \({\mathcal {F}}_h = {\mathcal {H}}_h\), but also all the Casimirs of the bracket (43) which are the functionals \({\mathcal {C}}_h\) such that \(\{{\mathcal {C}}_h, {\mathcal {G}}_h\} = 0\) for all \({\mathcal {G}}_h\), and new Casimirs may be derived using the Jacobi identity, see e.g. [20]. An important example is provided by the functionals

$$\begin{aligned} {\mathcal {C}}_h : ({{\varvec{{\mathsf {X}}}}}_N,{{\varvec{{\mathsf {V}}}}}_N,{\varvec{E}}_h,{\varvec{B}}_h) \mapsto \int _\varOmega \check{\phi }_h \left( {\mathrm{div}}\, {\varvec{E}}_h - \varPi ^3\left( \sum _{p=1}^N q_p S_{{\varvec{X}}_p}g\right) \right) \end{aligned}$$
(44)

associated to an arbitrary \(\check{\phi }_h \in V^3_h\). The fact that they are Casimirs will be verified just below, and it implies that the discrete Gauss law \({\mathrm{div}}\, {\varvec{E}}_h = \varPi ^3 \rho ^S_N\) is preserved by our equations.

Theorem 1 will be most conveniently proven on a matrix form of the equations, which we will describe in Sect. 4. However a few basic conservation properties can be proven with a direct argument.

Theorem 2

Under the conditions of Theorem 1, the evolution Eqs. (37)–(39) preserve the discrete Hamiltonian (41) as well as the variational Gauss laws (40).

Remark 3

(weak Gauss law) Similarly as for the GEMPIC method [25], the magnetic Gauss law plays the role of a pseudo-Casimir, in the sense that its conservation is actually needed to establish that the evolution system has a discrete Hamiltonian structure. With a strong-Ampère ansatz (12), we observe that this divergence-free constraint is only preserved in a weak sense, see (36). Although this may seem very weak, we will see below that it is the natural discrete invariant that provides a Poisson structure for the resulting Hamiltonian system.

Proof

The preservation of the magnetic Gauss law readily follows from the weak Faraday equation in (37), indeed we have

$$\begin{aligned} - \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} \int _{\varOmega } {\varvec{B}}_h \cdot {\mathrm{grad}}\, \varphi _h = \int _{\varOmega } {\mathrm{curl}}_w {\varvec{E}}_h \cdot {\mathrm{grad}}\, \varphi _h = \int _{\varOmega } {\varvec{E}}_h \cdot {\mathrm{curl}}\, {\mathrm{grad}}\, \varphi _h = 0 \end{aligned}$$

for all \(\varphi _h \in V_h^0\), using again the definition (13) of the weak curl operator. Turning to the electric Gauss law, we use \(\frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} {\varvec{X}}_p(t) = {\varvec{V}}_p\) to compute for an arbitrary smooth function \(\psi \)

$$\begin{aligned} \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} \int _{\varOmega } \rho ^S_N(t,{\varvec{x}}) \psi ({\varvec{x}}) \, {\mathrm{d}}{\varvec{x}}= & {} \sum _{p = 1}^N q_p \int _{\varOmega } S({\tilde{{\varvec{x}}}}) {\varvec{V}}_p \cdot {\mathrm{grad}}\, \psi ({\tilde{{\varvec{x}}}}+{\varvec{X}}_p) \, {\mathrm{d}}{\tilde{{\varvec{x}}}}\\= & {} \int _{\varOmega } {\varvec{J}}^S_N(t,{\varvec{x}}) \cdot {\mathrm{grad}}\, \psi ({\varvec{x}}) \, {\mathrm{d}}{\varvec{x}}\end{aligned}$$

which shows that the continuity equation

$$\begin{aligned} {\partial _{t}}\rho ^S_N + {\mathrm{div}}\, {\varvec{J}}^S_N = 0 \end{aligned}$$
(45)

always holds in distribution’s sense, independently of the discrete particle trajectories. Taking next the divergence of the discrete Ampère equation in (37), the commuting diagram property (10) (which holds thanks to the admissibility of S) allows us to write

$$\begin{aligned} {\partial _{t}}{\mathrm{div}}\, {\varvec{E}}_h = -{\mathrm{div}}\, \varPi ^2 {\varvec{J}}^S_N = -\varPi ^3 {\mathrm{div}}\, {\varvec{J}}^S_N = {\partial _{t}}\varPi ^3 \rho ^S_N \end{aligned}$$

where the last equality follows from (45) and from the time-invariance of the operator \(\varPi ^3\). Integrating over time this shows that the electric Gauss law is indeed preserved. Another argument consists of verifying that any functional of the form (44) is indeed a Casimir. To do so we compute that the (Riesz representants of the) functional derivatives of \({\mathcal {C}}_h\) read

$$\begin{aligned} \frac{\delta {\mathcal {C}}_h}{\delta {\varvec{X}}_p} = q_p \sum _{\alpha =1}^3 \left( \int _\varOmega \check{\phi }_h \varPi ^3({{\varvec{e}}}_\alpha \cdot {\mathrm{grad}}\, S_{{\varvec{X}}_p}) \right) {{\varvec{e}}}_\alpha = q_p \sum _{\alpha =1}^3 \left( \int _\varOmega \check{\phi }_h \varPi ^3{\mathrm{div}}\, ({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p})\big ) \right) {{\varvec{e}}}_\alpha \end{aligned}$$

and

$$\begin{aligned} \frac{\delta {\mathcal {C}}_h}{\delta {\varvec{E}}_h} = - \,{\mathrm{grad}}_w \check{\phi }_h. \end{aligned}$$

As for the derivatives \(\frac{\delta {\mathcal {C}}_h}{\delta {\varvec{V}}_p}\) and \(\frac{\delta {\mathcal {C}}_h}{\delta {\varvec{B}}_h}\), they vanish. For the discrete bracket (43) we thus find

$$\begin{aligned} \begin{aligned} {\left\{ {\mathcal {C}}_h , {\mathcal {G}}_h \right\} }&= \sum _{p=1}^N \frac{q_p}{m_p}\int _\varOmega \left( \check{\phi }_h \varPi ^3{\mathrm{div}}\,\Big (\frac{\delta {\mathcal {G}}_h}{\delta {\varvec{V}}_p} S_{{\varvec{X}}_p}\Big ) + {\mathrm{grad}}_w \check{\phi }_h \cdot \varPi ^2\Big ( S_{{\varvec{X}}_p}\frac{\delta {\mathcal {G}}_h}{\delta {\varvec{V}}_p}\Big ) \right) \, {\mathrm{d}}{\varvec{x}}\\&\quad - \int _\varOmega {\mathrm{grad}}_w \check{\phi }_h \cdot {\mathrm{curl}}\,\frac{\delta {\mathcal {G}}_h}{\delta {\varvec{B}}_h} \, {\mathrm{d}}{\varvec{x}}. \end{aligned} \end{aligned}$$

Here the first term vanishes for arbitrary vectors \(\frac{\delta {\mathcal {G}}_h}{\delta {\varvec{V}}_p} \in \mathbb {R}^3\), by using the commuting diagram property and the definition of the weak gradient operator. As for the second term, a discrete integration by parts yields \(\int _\varOmega {\mathrm{grad}}_w \check{\phi }_h \cdot {\mathrm{curl}}\,\frac{\delta {\mathcal {G}}_h}{\delta {\varvec{B}}_h} \, {\mathrm{d}}{\varvec{x}}= - \int _\varOmega \check{\phi }_h {\mathrm{div}}\, {\mathrm{curl}}\,\frac{\delta {\mathcal {G}}_h}{\delta {\varvec{B}}_h} \, {\mathrm{d}}{\varvec{x}}= 0\), which establishes that \({\left\{ {\mathcal {C}}_h , {\mathcal {G}}_h \right\} } = 0\) for any \({\mathcal {G}}_h\). Equation (42) applied to \({\mathcal {F}}_h = {\mathcal {C}}_h\) then shows that the quantity \({\mathrm{div}}\, {\varvec{E}}_h - \varPi ^3 \rho ^S_N\) is an invariant of the evolution system. Finally to verify the energy conservation, we may simply observe that the bracket (43) is antisymmetric, so that \({\mathcal {F}}_h = {\mathcal {H}}_h\) is an obvious invariant of (42). A more pedestrian argument is to first compute using (37)

$$\begin{aligned} \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} \left( \frac{1}{2} \int _{\varOmega } |{\varvec{E}}_h|^2 + |{\varvec{B}}_h|^2 \right)= & {} \int _{\varOmega } {\varvec{E}}_h \cdot ({\mathrm{curl}}\, {\varvec{B}}_h - \varPi ^2 {\varvec{J}}^S_N) - {\varvec{B}}_h \cdot {\mathrm{curl}}_w {\varvec{E}}_h\\= & {} - \int _{\varOmega } {\varvec{E}}_h \cdot \varPi ^2 {\varvec{J}}^S_N \end{aligned}$$

where we have used the adjoint definition of \({\mathrm{curl}}_w\), and then, using the trajectory equations (38)–(39),

$$\begin{aligned} \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} \left( \sum _{p = 1}^N \frac{m_p}{2} |{\varvec{V}}_p|^2 \right)= & {} \sum _{p = 1}^N q_p {\varvec{V}}_p \cdot \big ({\varvec{E}}^S({\varvec{X}}_p) + {\varvec{V}}_p \times {\varvec{B}}^S({\varvec{X}}_p)\big ) \nonumber \\= & {} \sum _{p = 1}^N q_p \int _{\varOmega } {\varvec{E}}_h\cdot \varPi ^2({\varvec{V}}_p S_{{\varvec{X}}_p}) = \int _{\varOmega } {\varvec{E}}_h \cdot \varPi ^2 {\varvec{J}}^S_N \end{aligned}$$
(46)

which shows that the discrete energy (41) is indeed constant over time. \(\square \)

3 Generic Gauss and Momentum Preserving Schemes

Similarly as for the method in [25], the semi-discrete scheme derived above is in general not momentum-preserving. However it is possible to describe a general variant that preserves both the Gauss laws and a discrete momentum. This modified scheme comes at the price of losing the discrete Hamiltonian (Poisson) structure and the conservation of energy, but it may be preferred for problems where momentum preservation is critical.

3.1 Particle-Field Coupling with Discrete Interior Products

Our momentum-preserving schemes rely on discrete interior products of the form

$$\begin{aligned} I^\ell _{{{\varvec{e}}}_\alpha } = {\mathcal {A}}_{h,\alpha } \imath ^\ell _{{{\varvec{e}}}_\alpha } : V_h^{\ell +1} \rightarrow V_h^\ell \end{aligned}$$
(47)

which involve the continuous interior products \(\imath ^\ell _{{{\varvec{e}}}_\alpha } : V^{\ell +1} \rightarrow V^{\ell }\) associated with a canonical unit vector \({{\varvec{e}}}_\alpha \), \(\alpha \in \llbracket 1, 3 \rrbracket \), namely

$$\begin{aligned} \imath ^0_{{{\varvec{e}}}_\alpha } {\varvec{C}}:= {\varvec{C}}\cdot {{\varvec{e}}}_\alpha , \qquad \imath ^1_{{{\varvec{e}}}_\alpha } {\varvec{F}}:= {\varvec{F}}\times {{\varvec{e}}}_\alpha , \qquad \imath ^2_{{{\varvec{e}}}_\alpha } g := g {{\varvec{e}}}_\alpha , \end{aligned}$$
(48)

and where \({\mathcal {A}}_{h,\alpha }\) is a linear approximation operator, such that the operators \(I^\ell _{{{\varvec{e}}}_\alpha }\) map every discrete space to its predecessor in the sequence, as stated in (47).

As a key property, denoting by \(d^0 = {\mathrm{grad}}\), \(d^1 = {\mathrm{curl}}\) and \(d^2 = {\mathrm{div}}\), we require that the associated discrete Lie derivatives, defined as

$$\begin{aligned} L^\ell _{h,{{\varvec{e}}}_\alpha } := d^{\ell -1} I^{\ell -1}_{{{\varvec{e}}}_\alpha } + I^{\ell }_{{{\varvec{e}}}_\alpha } d^{\ell } : \quad V^\ell _h \rightarrow V^\ell _h \end{aligned}$$

are antisymmetric, in the sense that \(\int _\varOmega G \cdot L^\ell _{h,{{\varvec{e}}}_\alpha } G = 0\) for all \(G \in V^\ell _h\), \(\ell \in \{1,2\}\) and \(1\le \alpha \le 3\). Specifically, the momentum preserving properties will rely on the following relations

$$\begin{aligned} \int _{\varOmega } {\varvec{C}}_h \cdot {\mathrm{grad}}\, I^0_{{{\varvec{e}}}_\alpha } {\varvec{C}}_h = -\int _{\varOmega } {\varvec{C}}_h \cdot I^1_{{{\varvec{e}}}_\alpha } {\mathrm{curl}}\, {\varvec{C}}_h \qquad \forall {\varvec{C}}_h \in V_h^1 \end{aligned}$$
(49)

and

$$\begin{aligned} \int _{\varOmega } {\varvec{F}}_h \cdot {\mathrm{curl}}\, I^1_{{{\varvec{e}}}_\alpha } {\varvec{F}}_h = - \int _{\varOmega } {\varvec{F}}_h \cdot I^2_{{{\varvec{e}}}_\alpha } {\mathrm{div}}\, {\varvec{F}}_h \qquad \forall {\varvec{F}}_h \in V_h^2. \end{aligned}$$
(50)

3.2 Gauss and Momentum-Preserving Schemes

Using the discrete interior products described above, we obtain the following result.

Theorem 3

The scheme obtained by coupling the discrete Maxwell equations (37) with the modified particle equations

$$\begin{aligned} \left\{ \begin{aligned}&\frac{\, {\mathrm{d}}{\varvec{X}}_p}{\, {\mathrm{d}}t} = {\varvec{V}}_p\\&\frac{\, {\mathrm{d}}{\varvec{V}}_p}{\, {\mathrm{d}}t} = \frac{q_p}{m_p} \big ({\varvec{E}}^S({\varvec{X}}_p) + {\varvec{R}}^S({\varvec{B}}_h,{\varvec{X}}_p,{\varvec{V}}_p) \big ) \end{aligned} \right. \qquad \text { for } p = 1, \dots , N \end{aligned}$$
(51)

with coupling fields defined as

$$\begin{aligned} \left\{ \begin{aligned}&{\varvec{E}}^S ({\varvec{X}}_p) = \sum _{\alpha = 1}^3 {{\varvec{e}}}_\alpha \int _{\varOmega } {\varvec{E}}_h({\varvec{x}}) \cdot (I^2_{{{\varvec{e}}}_\alpha } \varPi ^3 S_{{\varvec{X}}_p})({\varvec{x}}) \, {\mathrm{d}}{\varvec{x}}\\&{\varvec{R}}^S ({\varvec{B}}_h,{\varvec{X}}_p,{\varvec{V}}_p) = -\sum _{\alpha = 1}^3 {{\varvec{e}}}_\alpha \int _{\varOmega } {\varvec{B}}_h({\varvec{x}}) \cdot (I^1_{{{\varvec{e}}}_\alpha } \varPi ^2 ({\varvec{V}}_p S_{{\varvec{X}}_p}))({\varvec{x}}) \, {\mathrm{d}}{\varvec{x}}\end{aligned} \right. \end{aligned}$$
(52)

preserves the discrete Gauss laws (40), as well as the discrete momentum

$$\begin{aligned} {\varvec{{\mathcal {P}}}}_{h}(t) = \sum _{p = 1}^N m_p {\varvec{V}}_p(t) - \sum _{\alpha =1}^3 {{\varvec{e}}}_\alpha \int _{\varOmega } (I^1_{{{\varvec{e}}}_\alpha } {\varvec{E}}_h(t,{\varvec{x}})) \cdot {\varvec{B}}_h(t,{\varvec{x}}) \, {\mathrm{d}}{\varvec{x}}. \end{aligned}$$
(53)

Remark 4

Given the form (47)–(48) of \(I^1_{{{\varvec{e}}}_\alpha }\) and the linearity of \({\mathcal {A}}_{h,\alpha }\), we have

$$\begin{aligned} \int _{\varOmega } (I^1_{{{\varvec{e}}}_\alpha } {\varvec{E}}_h) \cdot {\varvec{B}}_h = \int _{\varOmega } (({\mathcal {A}}_{h,\alpha } {\varvec{E}}_h) \times {{\varvec{e}}}_\alpha ) \cdot {\varvec{B}}_h = \int _{\varOmega } ({\varvec{B}}_h \times ({\mathcal {A}}_{h,\alpha } {\varvec{E}}_h)) \cdot {{\varvec{e}}}_\alpha \end{aligned}$$

which makes clear how (53) approximates the exact momentum along \({{\varvec{e}}}_\alpha \). Similarly, we have

$$\begin{aligned} {\varvec{R}}^S ({\varvec{B}}_h,{\varvec{X}}_p,{\varvec{V}}_p) \cdot {{\varvec{e}}}_\alpha = \int _{\varOmega } \Big (\big ({\mathcal {A}}_{h,\alpha } \varPi ^2({\varvec{V}}_p S_{{\varvec{X}}_p})\big ) \times {\varvec{B}}_h \Big ) \cdot {{\varvec{e}}}_\alpha \end{aligned}$$
(54)

which shows that the discrete magnetic force involved in (51) is indeed an approximation of the “natural” term \({\varvec{V}}_p \times {\varvec{B}}_h({\varvec{X}}_p)\). However it is not possible in general to write \({\varvec{R}}^S ({\varvec{B}}_h,{\varvec{X}}_p,{\varvec{V}}_p)\) as a product of the form \({\varvec{V}}_p \times {\varvec{B}}^S({\varvec{X}}_p)\) for some field \({\varvec{B}}^S\), because the approximation operators \({\mathcal {A}}_{h,\alpha }\) involved in the trajectory equation depend a priori on the component \(\alpha \) of the latter.

Proof

We first observe that the arguments used in the proof of Theorem 2 for the conservation of the discrete Gauss laws did not rely on the particle trajectory equation, hence they are still valid for the modified scheme. Turning to the discrete momentum, we compute using (51)

$$\begin{aligned} \begin{aligned} \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} \sum _{p = 1}^N m_p {\varvec{V}}_p \cdot {{\varvec{e}}}_\alpha&= \sum _{p = 1}^N q_p \int _{\varOmega } \big ({\varvec{E}}_h \cdot \big (I^2_{{{\varvec{e}}}_\alpha } \varPi ^3 S_{{\varvec{X}}_p}\big ) - {\varvec{B}}_h \cdot \big (I^1_{{{\varvec{e}}}_\alpha } \varPi ^2 \big ({\varvec{V}}_p S_{{\varvec{X}}_p}\big )\big )\big ) \\&= \int _\varOmega {\varvec{E}}_h\cdot \big (I^2_{{{\varvec{e}}}_\alpha } \varPi ^3\rho ^S_N\big ) - \int _\varOmega {\varvec{B}}_h\cdot \big (I^1_{{{\varvec{e}}}_\alpha } \varPi ^2 {\varvec{J}}^S_N\big ). \end{aligned} \end{aligned}$$

Using next (37) we write

$$\begin{aligned} \begin{aligned} \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} \int _\varOmega I^1_{{{\varvec{e}}}_\alpha } {\varvec{E}}_h \cdot {\varvec{B}}_h&= - \int _\varOmega I^1_{{{\varvec{e}}}_\alpha } {\varvec{E}}_h \cdot {\mathrm{curl}}_w {\varvec{E}}_h + \int _\varOmega \big (I^1_{{{\varvec{e}}}_\alpha } \big ({\mathrm{curl}}\, {\varvec{B}}_h - \varPi ^2 {\varvec{J}}^S_N\big )\big ) \cdot {\varvec{B}}_h \\&= - \int _\varOmega {\mathrm{curl}}\, I^1_{{{\varvec{e}}}_\alpha } {\varvec{E}}_h \cdot {\varvec{E}}_h + \int _\varOmega \big (I^1_{{{\varvec{e}}}_\alpha } {\mathrm{curl}}\, {\varvec{B}}_h\big ) \cdot {\varvec{B}}_h - \int _\varOmega \big (I^1_{{{\varvec{e}}}_\alpha } \varPi ^2 {\varvec{J}}^S_N\big ) \cdot {\varvec{B}}_h \\&= \int _\varOmega \big (I^2_{{{\varvec{e}}}_\alpha } {\mathrm{div}}\, {\varvec{E}}_h\big ) \cdot {\varvec{E}}_h - \int _\varOmega \big ({\mathrm{grad}}\, I^0_{{{\varvec{e}}}_\alpha } {\varvec{B}}_h\big ) \cdot {\varvec{B}}_h - \int _\varOmega \big (I^1_{{{\varvec{e}}}_\alpha } \varPi ^2 {\varvec{J}}^S_N\big ) \cdot {\varvec{B}}_h \\&= \int _\varOmega \big (I^2_{{{\varvec{e}}}_\alpha } \varPi ^3\rho ^S_N\big ) \cdot {\varvec{E}}_h - \int _\varOmega \big (I^1_{{{\varvec{e}}}_\alpha } \varPi ^2 {\varvec{J}}^S_N\big ) \cdot {\varvec{B}}_h = \frac{\, {\mathrm{d}}}{\, {\mathrm{d}}t} \sum _{p = 1}^N m_p {\varvec{V}}_p \cdot {{\varvec{e}}}_\alpha \end{aligned} \end{aligned}$$

where we have used the definition of the weak curl operator in the second equality, the relations (49)–(50) in the third one and the preservation of the discrete (weak and strong) Gauss laws in the last one. \(\square \)

3.3 Interior Products Based on Directional Averaging on Tensor-Product Spaces

In this section we show that a simple construction based on directional averaging allows to design momentum-preserving schemes when the compatible sequence

$$\begin{aligned} V^0_h \xrightarrow { {~ {\mathrm{grad}}~} } V^1_h \xrightarrow { {~ {\mathrm{curl}}~} } V^2_h \xrightarrow { {~ {\mathrm{div}}~} } V^3_h \end{aligned}$$

involves tensor-product spaces of the form

$$\begin{aligned} V^0_h = \mathbb {U}^{1}_{h} \otimes \mathbb {U}^{2}_{h} \otimes \mathbb {U}^{3}_{h} \end{aligned}$$
(55)

and

$$\begin{aligned} V^1_h = \begin{pmatrix} \mathbb {V}^{1}_{h} \otimes \mathbb {U}^{2}_{h} \otimes \mathbb {U}^{3}_{h} \\ \mathbb {U}^{1}_{h} \otimes \mathbb {V}^{2}_{h} \otimes \mathbb {U}^{3}_{h} \\ \mathbb {U}^{1}_{h} \otimes \mathbb {U}^{2}_{h} \otimes \mathbb {V}^{3}_{h} \end{pmatrix}, \qquad V^2_h = \begin{pmatrix} \mathbb {U}^{1}_{h} \otimes \mathbb {V}^{2}_{h} \otimes \mathbb {V}^{3}_{h} \\ \mathbb {V}^{1}_{h} \otimes \mathbb {U}^{2}_{h} \otimes \mathbb {V}^{3}_{h} \\ \mathbb {V}^{1}_{h} \otimes \mathbb {V}^{2}_{h} \otimes \mathbb {U}^{3}_{h} \end{pmatrix}, \qquad V^3_h = \mathbb {V}^{1}_{h} \otimes \mathbb {V}^{2}_{h} \otimes \mathbb {V}^{3}_{h},\nonumber \\ \end{aligned}$$
(56)

where the univariate, scalar-valued function spaces

$$\begin{aligned} \mathbb {U}^\alpha _h = {\mathrm{Span\,}}\big (\{\varLambda ^{0,\alpha }_k : k \in \llbracket 1, N^\alpha _0 \rrbracket \}\big ), \qquad \mathbb {V}^\alpha _h = {\mathrm{Span\,}}\big (\{\varLambda ^{1,\alpha }_k : k \in \llbracket 1, N^\alpha _1 \rrbracket \}\big ) \end{aligned}$$

form an exact sequence along each dimension \(\alpha \in \llbracket 1, 3 \rrbracket \),

$$\begin{aligned} \mathbb {R}\rightarrow \mathbb {U}^{\alpha }_{h} \xrightarrow { {~ \partial _\alpha ~} } \mathbb {V}^{\alpha }_{h} \rightarrow \{0\}. \end{aligned}$$
(57)

Lemma 1

Assume that the univariate sequences (57) are exact, with spaces \(\mathbb {U}^{\alpha }_{h}\) invariant over translations of \(\pm h_\alpha \), \(1 \le \alpha \le 3\). Then the discrete interior products \( I^\ell _{{{\varvec{e}}}_\alpha } = {\mathcal {A}}_{h,\alpha } \imath ^\ell _{{{\varvec{e}}}_\alpha } \) defined by composing the exact interior products (48) with the directional averaging operator,

$$\begin{aligned} ({\mathcal {A}}_{h,1} G)({\varvec{x}}) := \frac{1}{2h_1} \int _{x_1-h_1}^{x_1+h_1} G(y_1, x_2, x_3) \, {\mathrm{d}}y_1 \end{aligned}$$
(58)

and similarly for \(\alpha = 2, 3\), map \(V^{\ell +1}_h\) to \(V^{\ell }_h\). Furthermore, they satisfy the relations (49)–(50).

Proof

Let us show that \(I^0_{{{\varvec{e}}}_\alpha }\) maps \(V^1_h\) to \(V^0_h\). For a generic basis function in \(V^1_h\), of the form

$$\begin{aligned} {\varvec{\varLambda }}^1_{\alpha ,{\varvec{k}}}({\varvec{x}}) = {{\varvec{e}}}_\alpha \varLambda ^{1,\alpha }_{k_\alpha } (x_\alpha )\prod _{\beta \ne \alpha } \varLambda ^{0,\beta }_{k_\beta }(x_\beta ), \end{aligned}$$

we observe that \( (\imath ^0_{{{\varvec{e}}}_\alpha } {\varvec{\varLambda }}^1_{\alpha ',{\varvec{k}}})({\varvec{x}}) = \delta _{\alpha , \alpha '} \varLambda ^{1,\alpha }_{k_\alpha } (x_\alpha )\prod _{\beta \ne \alpha } \varLambda ^{0,\beta }_{k_\beta }(x_\beta ) \) using (48) and the tensor-product structure (55)–(57). The exact sequence property (57) then allows us to write \(\varLambda ^{1,\alpha }_{k_\alpha } = \partial _\alpha \varGamma ^{0,\alpha }_{k_\alpha }\) for some \(\varGamma ^{0,\alpha }_{k_\alpha } \in \mathbb {U}^\alpha _h\), which yields

$$\begin{aligned} (I^0_{{{\varvec{e}}}_\alpha } {\varvec{\varLambda }}^1_{\alpha ,{\varvec{k}}})({\varvec{x}}) = \big ( {\mathcal {A}}_{h,\alpha } \varLambda ^{1,\alpha }_{k_\alpha } \big )(x_\alpha ) \prod _{\beta \ne \alpha } \varLambda ^{0,\beta }_{k_\beta }(x_\beta ) = \frac{1}{2h_\alpha } \left[ \varGamma ^{0,\alpha }_{k_\alpha } \right] _{x_\alpha -h_\alpha }^{x_\alpha +h_\alpha } \prod _{\beta \ne \alpha } \varLambda ^{0,\beta }_{k_\beta }(x_\beta ) \end{aligned}$$

which belongs to \(V^0_h\), according to (55) and the discrete translation invariance. The argument for the other spaces is similar. Turning to (49)–(50) we next observe that the directional averaging operators are of the form \({\mathcal {A}}_{h,\alpha } G = \mu _\alpha * G\) with a symmetric measure \(\mu _\alpha (-{\varvec{x}}) = \mu _\alpha ({\varvec{x}})\). Thus,

$$\begin{aligned} \int _\varOmega G (\mu _\alpha * \partial _\beta G) = \int _\varOmega (\mu _\alpha * G) \partial _\beta G = - \int _\varOmega \big (\partial _\beta (\mu _\alpha * G)\big ) G = - \int _\varOmega (\mu _\alpha * \partial _\beta G) G = 0 \end{aligned}$$

for all \(\alpha \), \(\beta \), and any function G. This allows to write a proof that is formally the same as for the continuous interior product (48). Thus, using that \(({\mathrm{curl}}\, {\varvec{C}}) \times {{\varvec{e}}}_\alpha = \partial _\alpha {\varvec{C}}- {\mathrm{grad}}\, C_\alpha \) we have

$$\begin{aligned} \int _{\varOmega } {\varvec{C}}\cdot {\mathrm{grad}}\, I^0_{{{\varvec{e}}}_\alpha } {\varvec{C}}= & {} \int _{\varOmega } {\varvec{C}}\cdot (\mu _\alpha * {\mathrm{grad}}\, C_\alpha ) = \int _{\varOmega } {\varvec{C}}\cdot \big (\mu _\alpha * (\partial _\alpha {\varvec{C}}- ({\mathrm{curl}}\, {\varvec{C}})\times {{\varvec{e}}}_\alpha ) \big ) \nonumber \\= & {} -\int _{\varOmega } {\varvec{C}}\cdot I^1_{{{\varvec{e}}}_\alpha } {\mathrm{curl}}\, {\varvec{C}}\end{aligned}$$
(59)

which proves (49). The relation (50) follows by a similar argument. \(\square \)

4 The Semi-discrete Hamiltonian System as a System of Ordinary Differential Equations

In this section, we express the variational particle method (37)–(38) as a system of ordinary differential equations. This will allow us to introduce some useful notation for our general framework, and to verify the Hamiltonian structure of the semi-discrete system.

4.1 Commuting Diagrams with Degrees of Freedom

One practical approach to build commuting projection operators is to introduce one additional layer in the diagram (7), consisting of coefficient spaces \({\mathcal {C}}^\ell = \mathbb {R}^{N_\ell }\) corresponding to the choice of specific bases for the finite-dimensional spaces \(V_h^\ell \) with dimension \(N_\ell \). This approach is somehow parallel to the geometric construction of [26] where commuting de Rham complexes are described for differential forms. As we consider here a a finite element setting, we will follow similar principles but our construction does not involve differential forms.

(60)

In this diagram the main novel ingredient is the degrees of freedom \({{{{\varvec{{\sigma }}}}}}^\ell = (\sigma ^\ell _i)_{1 \le i \le N_\ell }\), which must be unisolvent for the finite-dimensional spaces \(V_h^\ell \) in the usual sense that they must be one-to-one when restricted to these spaces. The spaces \(V^\ell \) then denote the domains of these degrees of freedom, and as above we consider a conforming discretization in the sense that \(V_h^\ell \subset V^\ell \). The other discrete entities can then be determined from the degrees of freedom.

  • The “interpolation” operators \({\mathcal {I}}^\ell \) are characterized by the right-inverse property \({{{\varvec{{\sigma }}}}}^\ell {\mathcal {I}}^\ell {{\varvec{{\mathsf {g}}}}}= {{\varvec{{\mathsf {g}}}}}\) for all \({{\varvec{{\mathsf {g}}}}}\in {\mathcal {C}}^\ell \). In particular, the basis functions \(\varLambda ^\ell _i \in V_h^\ell \) defined by the usual duality relations

    $$\begin{aligned} \sigma ^\ell _i\big (\varLambda ^\ell _j\big ) = \delta _{i,j} \qquad \text { for } ~~ 1 \le i, j \le N_\ell \end{aligned}$$
    (61)

    correspond to \(\varLambda ^\ell _i = {\mathcal {I}}^\ell {{\varvec{{\mathsf {e}}}}}^\ell _i\) where \({{\varvec{{\mathsf {e}}}}}^\ell _i = (\delta _{i,j})_{1 \le j \le N_\ell }\) is a canonical basis vector of \({\mathcal {C}}^\ell \). It is sometimes convenient to stack the basis functions into colum vectors , and to use a matrix notation for stacked functionals evaluated on vectors of functions. With this convention, the duality relation (61) reads

    (62)
  • The matrices \({\mathbb {D}}^\ell \in \mathbb {R}^{N_{\ell +1} \times N_{\ell }}\) correspond to the differential operators \(d^0 = {\mathrm{grad}}\), \(d^1 = {\mathrm{curl}}\) and \(d^2 = {\mathrm{div}}\) in the respective bases, namely

    (63)

    so that we have for all with \({{\varvec{{\mathsf {g}}}}}\in {\mathcal {C}}^\ell \).

  • The projection operators are defined as \(\varPi ^\ell = {\mathcal {I}}^\ell {{{\varvec{{\sigma }}}}}^\ell : G \rightarrow \sum _i \sigma _i^\ell (G) \varLambda ^\ell _i\), that is,

    (64)

    and they are characterized by the relations

    $$\begin{aligned} \sigma ^\ell _i(\varPi ^\ell G) = \sigma ^\ell _i(G) \qquad \text { for } \quad 1 \le i \le N_\ell , \end{aligned}$$
    (65)

    indeed we have for all \(G \in V^\ell \).

This setting proves particularly useful in practice, as it allows to restate the commuting diagram properties (7) as a linear relation between degrees of freedom.

Lemma 2

The following properties are equivalent:

  1. (i)

    the projection operators (64) satisfy the commuting diagram properties (7),

    $$\begin{aligned} \varPi ^{\ell +1} d^\ell G = d^\ell \varPi ^\ell G \qquad \text { for all } ~ G \in V^\ell , \end{aligned}$$
    (66)
  2. (ii)

    there exists a matrix \({\mathbb {D}}^\ell \in \mathbb {R}^{N_{\ell +1} \times N_{\ell }}\) such that

    $$\begin{aligned} {{{\varvec{{\sigma }}}}}^{\ell +1} (d^\ell G) = {\mathbb {D}}^\ell {{{\varvec{{\sigma }}}}}^\ell (G) \qquad \text { for all } ~ G \in V^\ell . \end{aligned}$$
    (67)

Moreover if (67) holds, then the matrix \({\mathbb {D}}^\ell \) coincides with (63).

Proof

The proof is a matter of elementary computations. For instance, (67) yields

$$\begin{aligned} {{{\varvec{{\sigma }}}}}^{\ell +1}(d^\ell \varPi ^\ell G) = {\mathbb {D}}^\ell {{{\varvec{{\sigma }}}}}^{\ell }(\varPi ^\ell G) = {\mathbb {D}}^\ell {{{\varvec{{\sigma }}}}}^{\ell }(G) = {{{\varvec{{\sigma }}}}}^{\ell +1}(d^\ell G) = {{{\varvec{{\sigma }}}}}^{\ell +1}(\varPi ^{\ell +1} d^\ell G) \end{aligned}$$

where we have used twice the characterization (65). \(\square \)

4.2 The Semi-discrete Hamiltonian System in Matrix Form

The introduction of a third layer in the commuting diagram offers the possibility to rewrite the semi-discrete scheme (37)–(38) as a system of ordinary differential equations in matrix form. To do so we collect all the dynamic variables in a global vector

$$\begin{aligned} {{\varvec{{\mathsf {U}}}}}= \begin{pmatrix} {{\varvec{{\mathsf {X}}}}}\\ {{\varvec{{\mathsf {V}}}}}\\ {{\varvec{{\mathsf {E}}}}}\\ {{\varvec{{\mathsf {B}}}}}\end{pmatrix} \end{aligned}$$

where the (column) vectors \({{\varvec{{\mathsf {X}}}}}= {{\varvec{{\mathsf {X}}}}}_N = ({\varvec{X}}_p)_{1 \le p \le N}\) and \({{\varvec{{\mathsf {V}}}}}= {{\varvec{{\mathsf {V}}}}}_N = ({\varvec{V}}_p)_{1 \le p \le N}\) in \(\mathbb {R}^{3N}\) collect all the particle positions and velocities as in Sect. 2.4, while the vectors \({{\varvec{{\mathsf {E}}}}}= {{{\varvec{{\sigma }}}}}^2({\varvec{E}}_h) \in \mathbb {R}^{N_2}\) and \({{\varvec{{\mathsf {B}}}}}= {{{\varvec{{\sigma }}}}}^1({\varvec{B}}_h) \in \mathbb {R}^{N_1}\) collect the coefficients of the electric and magnetic fields in their respective bases. Using these degrees of freedom, we observe that the coupling fields (39) read

$$\begin{aligned} \left\{ \begin{aligned}&E^S_\alpha ({\varvec{X}}_p) = \int _{\varOmega } {\varvec{E}}_h({\varvec{x}}) \cdot \varPi ^2({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p})({\varvec{x}}) \, {\mathrm{d}}{\varvec{x}}= \sum _{i,j = 1}^{N_2} \sigma ^2_i({\varvec{E}}_h) {\mathbb {M}}^2_{i,j} \sigma ^2_j({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p}) \qquad \\&B^S_\alpha ({\varvec{X}}_p) = \int _{\varOmega } {\varvec{B}}_h ({\varvec{x}}) \cdot \varPi ^1 ({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p})({\varvec{x}}) \, {\mathrm{d}}{\varvec{x}}= \sum _{i,j = 1}^{N_1} \sigma ^1_i({\varvec{B}}_h) {\mathbb {M}}^1_{i,j} \sigma ^1_j({{\varvec{e}}}_\alpha S_{{\varvec{X}}_p}) \end{aligned} \right. \end{aligned}$$

where \({\mathbb {M}}^\ell \) is the standard finite-element mass matrix in the corresponding basis of \(V_h^\ell \), \(\ell =1, 2\),

$$\begin{aligned} {\mathbb {M}}^\ell _{i,j} = \int _\varOmega {\varvec{\varLambda }}^\ell _i({\varvec{x}}) \cdot {\varvec{\varLambda }}^\ell _j ({\varvec{x}}) \, {\mathrm{d}}{\varvec{x}}, \qquad 1\le i,j\le N_\ell . \end{aligned}$$
(68)

The value of the coupling fields at the particle positions may then be expressed as vectors,

$$\begin{aligned} {\varvec{E}}^S({{\varvec{{\mathsf {X}}}}}) = {\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}}) {\mathbb {M}}^2 {{\varvec{{\mathsf {E}}}}}\qquad \text { and } \qquad {\varvec{B}}^S({{\varvec{{\mathsf {X}}}}}) = {\mathbb {S}}^1({{\varvec{{\mathsf {X}}}}}) {\mathbb {M}}^1 {{\varvec{{\mathsf {B}}}}}\qquad \text { in } \mathbb {R}^{3N}, \end{aligned}$$
(69)

where \({\mathbb {S}}^\ell ({{\varvec{{\mathsf {X}}}}}) \in \mathbb {R}^{3N \times N_\ell }\) denotes the matrix with \((3\times 1)\) blocks

$$\begin{aligned} {\mathbb {S}}^\ell ({{\varvec{{\mathsf {X}}}}})_{p,i} = \begin{pmatrix} \sigma ^\ell _i({{\varvec{e}}}_1 S_{{\varvec{X}}_p} )&\sigma ^\ell _i({{\varvec{e}}}_2 S_{{\varvec{X}}_p} )&\sigma ^\ell _i({{\varvec{e}}}_3 S_{{\varvec{X}}_p} ) \end{pmatrix}^\top \quad \text { for } ~~ 1 \le p \le N, ~~ 1 \le i \le N_\ell . \end{aligned}$$
(70)

We finally let \(\mathbb {r}({\varvec{b}}) = \big (({{\varvec{e}}}_\alpha \times {{\varvec{e}}}_\beta ) \cdot {\varvec{b}}\big )_{1 \le \alpha , \beta \le 3} \in \mathbb {R}^{3\times 3}\) be the rotation matrix

$$\begin{aligned} \mathbb {r}({\varvec{b}}) = \begin{pmatrix} 0 &{} b_3 &{} - b_2\\ -b_3 &{} 0 &{} b_1 \\ b_2 &{} -b_1 &{} 0 \end{pmatrix} \quad \text { such that } \quad {\varvec{v}}\times {\varvec{b}}= \mathbb {r}({\varvec{b}}) {\varvec{v}}\quad \text { for all } {\varvec{v}}, {\varvec{b}}\in \mathbb {R}^3, \end{aligned}$$
(71)

and we denote by \({\mathbb {R}}({\varvec{b}}({{\varvec{{\mathsf {X}}}}})) \in \mathbb {R}^{3N\times 3N}\) the block-diagonal rotation matrix with \(3 \times 3\) blocks

$$\begin{aligned} {\mathbb {R}}({\varvec{b}}({{\varvec{{\mathsf {X}}}}}))_{p,p} = \mathbb {r}({\varvec{b}}({\varvec{X}}_p)). \end{aligned}$$
(72)

Then the particle trajectory equations (38)–(39),

$$\begin{aligned} \left\{ \begin{aligned}&\frac{\, {\mathrm{d}}{\varvec{X}}_p}{\, {\mathrm{d}}t} = {\varvec{V}}_p \\&\frac{\, {\mathrm{d}}{\varvec{V}}_p}{\, {\mathrm{d}}t} = \frac{q_p}{m_p} \big ({\varvec{E}}^S({\varvec{X}}_p) + {\varvec{V}}_p \times {\varvec{B}}^S({\varvec{X}}_p) \big ) \end{aligned} \right. \qquad \text { for } p = 1, \dots , N \end{aligned}$$
(73)

can be written in matrix form

$$\begin{aligned} \left\{ \begin{aligned} \frac{\, {\mathrm{d}}{{\varvec{{\mathsf {X}}}}}}{\, {\mathrm{d}}t}&= {{\varvec{{\mathsf {V}}}}},\\ \frac{\, {\mathrm{d}}{{\varvec{{\mathsf {V}}}}}}{\, {\mathrm{d}}t}&= {\mathbb {W}}_{\frac{q}{m}} \big ( {\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}}) {\mathbb {M}}^2 {{\varvec{{\mathsf {E}}}}}+ {\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}}){{\varvec{{\mathsf {V}}}}}\big ) , \end{aligned} \right. \end{aligned}$$
(74)

where \({\mathbb {W}}_{\frac{q}{m}} = {\mathrm{diag\,}}(\frac{q_p}{m_p} : (p,\alpha ) \in \llbracket 1, N \rrbracket \times \llbracket 1, 3 \rrbracket )\) is the \(3N \times 3N\) diagonal weighting matrix carrying the particles charge to mass ratios, and where we have denoted

$$\begin{aligned} {\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}}) = {\mathbb {R}}({\varvec{B}}^S({{\varvec{{\mathsf {X}}}}})) = {\mathbb {R}}({\mathbb {S}}^1({{\varvec{{\mathsf {X}}}}}){\mathbb {M}}^1 {{\varvec{{\mathsf {B}}}}}) \qquad \text { in } \mathbb {R}^{3N\times 3N} \end{aligned}$$
(75)

the block-diagonal rotation matrix associated with the coupling magnetic field. Observe that its diagonal blocks read \( {\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}})_{p,p} = \big ( {\varvec{\sigma }}^1({{\varvec{e}}}_\alpha \times {{\varvec{e}}}_\beta S_{{\varvec{X}}_p})^\top {\mathbb {M}}^1 {{\varvec{{\mathsf {B}}}}}\big )_{1\le \alpha , \beta \le 3}. \) Turning to the field Eq. (37), we see that the strong Ampère equation can be expressed directly on the degrees of freedom \({{{\varvec{{\sigma }}}}}^2\). From the characterization of the projection operator (65) we have \( \sigma ^2_i(\varPi ^2 {\varvec{J}}^S_N) = \sum _{p = 1 \ldots N} q_p \sigma ^2_i({\varvec{V}}_p S_{{\varvec{X}}_p}), \) hence our Ampère equation takes the form

$$\begin{aligned} \frac{\, {\mathrm{d}}{{\varvec{{\mathsf {E}}}}}}{\, {\mathrm{d}}t} - {\mathbb {C}}{{\varvec{{\mathsf {B}}}}}= - {\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}})^\top {\mathbb {W}}_q {{\varvec{{\mathsf {V}}}}}\end{aligned}$$
(76)

with \({\mathbb {C}}= {\mathbb {D}}^1\) the matrix of the operator \({\mathrm{curl}}: V_h^1 \rightarrow V_h^2\), see (63), \({\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}})\) the matrix defined in (70) and \({\mathbb {W}}_q\) the diagonal weighting matrix carrying the particles charges. Finally the weak Faraday equation is tested against the basis functions \({\varvec{\varLambda }}^1_i\). By definition of the weak curl operator (13) this yields

$$\begin{aligned} {\mathbb {M}}^1\frac{\, {\mathrm{d}}{{\varvec{{\mathsf {B}}}}}}{\, {\mathrm{d}}t} + {\mathbb {C}}^\top {\mathbb {M}}^2 {{\varvec{{\mathsf {E}}}}}= 0 \end{aligned}$$
(77)

with \({\mathbb {M}}^1\) and \({\mathbb {M}}^2\) the mass matrices recalled in (68).

Finally, rewriting the discrete Hamiltonian \({\mathcal {H}}_h({{\varvec{{\mathsf {X}}}}}_N, {{\varvec{{\mathsf {V}}}}}_N, {\varvec{E}}_h, {\varvec{B}}_h)\) as a function of the array variables

$$\begin{aligned} {\mathsf {H}}({{\varvec{{\mathsf {U}}}}}) = \tfrac{1}{2} {{\varvec{{\mathsf {V}}}}}^\top {\mathbb {W}}_m {{\varvec{{\mathsf {V}}}}}+ \tfrac{1}{2} {{\varvec{{\mathsf {E}}}}}^\top {\mathbb {M}}^2 {{\varvec{{\mathsf {E}}}}}+ \tfrac{1}{2} {{\varvec{{\mathsf {B}}}}}^\top {\mathbb {M}}^1 {{\varvec{{\mathsf {B}}}}}, \end{aligned}$$
(78)

with \({\mathbb {W}}_m\) the diagonal weighting matrix carrying the particle masses, see (41), we obtain for the corresponding derivatives

$$\begin{aligned} \nabla _{{{\varvec{{\mathsf {U}}}}}} {\mathsf {H}}({{\varvec{{\mathsf {U}}}}}) = \begin{pmatrix} \nabla _{{{\varvec{{\mathsf {X}}}}}} {\mathsf {H}}\\ \nabla _{{{\varvec{{\mathsf {V}}}}}} {\mathsf {H}}\\ \nabla _{{{\varvec{{\mathsf {E}}}}}} {\mathsf {H}}\\ \nabla _{{{\varvec{{\mathsf {B}}}}}} {\mathsf {H}}\end{pmatrix}({{\varvec{{\mathsf {U}}}}}) = \begin{pmatrix} {{\varvec{\mathsf {0}}}} \\ {\mathbb {W}}_m {{\varvec{{\mathsf {V}}}}}\\ {\mathbb {M}}^2 {{\varvec{{\mathsf {E}}}}}\\ {\mathbb {M}}^1 {{\varvec{{\mathsf {B}}}}}\end{pmatrix} \end{aligned}$$

which allows us to rewrite the equations (37)–(39) as a system of ODEs

$$\begin{aligned} \frac{\, {\mathrm{d}}{{\varvec{{\mathsf {U}}}}}}{\, {\mathrm{d}}t} = {\mathbb {J}}({{\varvec{{\mathsf {U}}}}})\nabla _{{\varvec{{\mathsf {U}}}}}{\mathsf {H}}({{\varvec{{\mathsf {U}}}}}) \end{aligned}$$
(79)

with a structure matrix given by

$$\begin{aligned} {\mathbb {J}}({{\varvec{{\mathsf {U}}}}}) = \begin{pmatrix} 0 &{}\quad {\mathbb {W}}_{\frac{1}{m}} &{}\quad 0&{}\quad 0 \\ -{\mathbb {W}}_{\frac{1}{m}} &{}\quad {\mathbb {W}}_{\frac{q}{m}} {\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}}, {{\varvec{{\mathsf {B}}}}}) {\mathbb {W}}_{\frac{1}{m}} &{}\quad {\mathbb {W}}_{\frac{q}{m}} {\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}}) &{}\quad 0\\ 0 &{}\quad -{\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}})^\top {\mathbb {W}}_{\frac{q}{m}} &{}\quad 0 &{}\quad {\mathbb {C}}({\mathbb {M}}^1)^{-1} \\ 0&{} \quad 0 &{}\quad - ({\mathbb {M}}^1)^{-1} {\mathbb {C}}^\top &{}\quad 0\\ \end{pmatrix}. \end{aligned}$$
(80)

In particular, System (79) may be rewritten in the form of a Poisson system

$$\begin{aligned} \frac{\, {\mathrm{d}}{{\varvec{{\mathsf {U}}}}}}{\, {\mathrm{d}}t} = \{{{\varvec{{\mathsf {U}}}}},{\mathsf {H}}\}({{\varvec{{\mathsf {U}}}}}) \end{aligned}$$
(81)

with a discrete bracket defined as \(\{ {\mathsf {F}}, {\mathsf {G}}\}({{\varvec{{\mathsf {U}}}}}) := (\nabla _{{\varvec{{\mathsf {U}}}}}{\mathsf {F}})^\top {\mathbb {J}}({{\varvec{{\mathsf {U}}}}}) \nabla _{{{\varvec{{\mathsf {U}}}}}} {\mathsf {G}}\), that is,

$$\begin{aligned} \begin{aligned} \{ {\mathsf {F}}, {\mathsf {G}}\}({{\varvec{{\mathsf {U}}}}})&= (\nabla _{{\varvec{{\mathsf {X}}}}}{\mathsf {F}})^\top {\mathbb {W}}_{\frac{1}{m}} \nabla _{{\varvec{{\mathsf {V}}}}}{\mathsf {G}}- (\nabla _{{\varvec{{\mathsf {V}}}}}{\mathsf {F}})^\top {\mathbb {W}}_{\frac{1}{m}} \nabla _{{\varvec{{\mathsf {X}}}}}{\mathsf {G}}\\&\quad + (\nabla _{{\varvec{{\mathsf {V}}}}}{\mathsf {F}})^\top {\mathbb {W}}_{\frac{q}{m}}{\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}}){\mathbb {W}}_{\frac{1}{m}}\nabla _{{\varvec{{\mathsf {V}}}}}{\mathsf {G}}\\&\quad + ( \nabla _{{\varvec{{\mathsf {V}}}}}{\mathsf {F}})^\top {\mathbb {W}}_{\frac{q}{m}}{\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}})\nabla _{{\varvec{{\mathsf {E}}}}}{\mathsf {G}}- (\nabla _{{\varvec{{\mathsf {E}}}}}{\mathsf {F}})^\top {\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}})^\top {\mathbb {W}}_{\frac{q}{m}}\nabla _{{\varvec{{\mathsf {V}}}}}{\mathsf {G}}\\&\quad + (\nabla _{{\varvec{{\mathsf {E}}}}}{\mathsf {F}})^\top {\mathbb {C}}({\mathbb {M}}^1)^{-1} \nabla _{{\varvec{{\mathsf {B}}}}}{\mathsf {G}}- (\nabla _{{\varvec{{\mathsf {B}}}}}{\mathsf {F}})^\top ({\mathbb {M}}^1)^{-1} {\mathbb {C}}^\top \nabla _{{\varvec{{\mathsf {E}}}}}{\mathsf {G}}. \end{aligned} \end{aligned}$$
(82)

Note that this is just the matrix form of the discrete bracket \(\{{\mathcal {F}}_h,{\mathcal {G}}_h\}\) given in (43), where \({\mathcal {F}}_h\) and \({\mathcal {G}}_h\) are the same functionals as \({\mathsf {F}}\) and \({\mathsf {G}}\) but seen as functions of the finite element fields \({\varvec{E}}_h, {\varvec{B}}_h\).

Compared with the Poisson matrix found in [25, Eq. (4.29)], we observe that the main difference lies in the fact that the particle-field coupling blocks now involve the degrees of freedom of the smoothed particles through the matrices \({\mathbb {S}}^2\) and \({\mathbb {S}}^1\) which involve the generic commuting diagram operators \(\varPi ^2\) and \(\varPi ^1\), see (70) and (75). In particular, the similarity of both matrices allows us to easily verify the Poisson structure of the semi-discrete system (37)–(39).

4.3 Proof of Theorem 1

Since we have rewritten our equations in a matrix form, it suffices to show that \({\mathbb {J}}\) is a Poisson matrix in the sense of [20,  Def. VII.2.4], i.e., that it is skew-symmetric and it satisfies the matrix Jacobi identity. This will show that (82) is a (non-canonical) Poisson bracket and that (81), namely (79), is a Poisson system.

Using that weighting matrices like \({\mathbb {W}}_{\frac{q}{m}}\) are diagonal, and that \({\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}})\) is skew-symmetric, we easily verify that \({\mathbb {J}}= - {\mathbb {J}}^T\). To verify the matrix Jacobi identity, we then observe that \({\mathbb {J}}\) has the same form as the one involved in the original GEMPIC scheme, see [25,  Eq. (4.29)], with \({\mathbb {C}}{\mathbb {M}}_1^{-1}\) and replaced by \(({\mathbb {M}}^1)^{-1}{\mathbb {C}}^\top \) and \({\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}})\), respectively (the mass and curl matrices being defined for different spaces, due to the different ansatz in the fields). We also note that \({\mathbb {R}}^1\) plays the role of the magnetic rotation matrix \({\mathbb {B}}\) in [25], with smoothed coupling terms as already observed. In particular, we may follow the same reasoning to verify that it satisfies the Jacobi identity, which amounts to verifying that the analog of Eqs. (4.34) and (4.38) hold in our case. Using the block-diagonal matrix \({\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}})\) defined by (75), and labelling its entries with multi-indices \((p,\alpha )\), \((p,\beta )\), and \((p,\gamma )\) corresponding to b, c, and d, Equation (4.34) becomes (for \(q_p \ne 0\))

$$\begin{aligned} \frac{\partial {\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}})_{(p,\alpha ),(p,\beta )}}{\partial X_{p,\gamma }} + \frac{\partial {\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}})_{(p,\beta ),(p,\gamma )}}{\partial X_{p,\alpha }} + \frac{\partial {\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}})_{(p,\gamma ),(p,\alpha )}}{\partial X_{p,\beta }} = 0 \qquad \forall p, \alpha , \beta , \gamma .\nonumber \\ \end{aligned}$$
(83)

Using the expression \( {\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}})_{(p,\alpha ),(p,\beta )} = {\varvec{\sigma }}^1({{\varvec{e}}}_\alpha \times {{\varvec{e}}}_\beta S_{{\varvec{X}}_p})^\top {\mathbb {M}}^1 {{\varvec{{\mathsf {B}}}}}\) seen above, this amounts to

$$\begin{aligned} {{\varvec{{\mathsf {B}}}}}^\top {\mathbb {M}}^1 {\varvec{\sigma }}^1\Big ( {{\varvec{e}}}_\alpha \times {{\varvec{e}}}_\beta (\partial _\gamma S_{{\varvec{X}}_p}) + {{\varvec{e}}}_\beta \times {{\varvec{e}}}_\gamma (\partial _\alpha S_{{\varvec{X}}_p}) + {{\varvec{e}}}_\gamma \times {{\varvec{e}}}_\alpha (\partial _\beta S_{{\varvec{X}}_p}) \Big ) = 0. \end{aligned}$$

By antisymmetry, we see that the function in parentheses vanishes if two of the components coincide, so that we may assume w.l.o.g. that \((\alpha , \beta , \gamma ) = (1,2,3)\). Then this function is just \(\nabla S_{{\varvec{X}}_p}\) and the above equation amounts to

$$\begin{aligned}&0 = {{\varvec{{\mathsf {B}}}}}^\top {\mathbb {M}}^1 {\varvec{\sigma }}^1\big (\nabla S_{{\varvec{X}}_p}) = \int _\varOmega {\varvec{B}}_h \cdot \varPi ^1(\nabla S_{{\varvec{X}}_p}) = \int _\varOmega {\varvec{B}}_h \cdot \nabla \varPi ^0(S_{{\varvec{X}}_p}) \\&\quad = - \int _\varOmega ({\mathrm{div}}_w {\varvec{B}}_h) \varPi ^0(S_{{\varvec{X}}_p}), \end{aligned}$$

where we have used the commuting diagram property and the admissibility of the shape function S. The desired equality (83) then follows from the discrete magnetic Gauss law, see (40).

The second equality to verify is the analog of Equation (4.37) from [25], which reads here (given the above matrix correspondence and correcting a typo on the sign of the right-hand side)

$$\begin{aligned} \frac{\partial {\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}})_{(p,\alpha ),i}}{\partial X_{p,\beta }} \!-\! \frac{\partial {\mathbb {S}}^2({{\varvec{{\mathsf {X}}}}})_{(p,\beta ),i}}{\partial X_{p,\alpha }} \!=\! - \sum _{j = 1}^{N_1} \frac{\partial {\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}})_{(p,\alpha ),(p,\beta )}}{\partial {{\mathsf {B}}}_j} \big (({\mathbb {M}}^1)^{-1}{\mathbb {C}}^\top \big )_{j,i} \qquad \forall p, \alpha , \beta , i.\nonumber \\ \end{aligned}$$
(84)

By antisymmetry of \({\mathbb {R}}^1\), we see that both sides vanish for \(\alpha = \beta \), so let us assume w.l.o.g. that \((\alpha ,\beta ) = (1,2)\). Then \({\mathbb {R}}^1({{\varvec{{\mathsf {X}}}}},{{\varvec{{\mathsf {B}}}}})_{(p,\alpha ),(p,\beta )} = {\varvec{\sigma }}^1({{\varvec{e}}}_3 S_{{\varvec{X}}_p})^\top {\mathbb {M}}^1 {{\varvec{{\mathsf {B}}}}}\) and by differentiating these entries and those of the matrix \({\mathbb {S}}^2\), see (70), the equality becomes

$$\begin{aligned} \sigma ^2_i\big ({{\varvec{e}}}_1 (\partial _2 S_{{\varvec{X}}_p}) \big ) - \sigma ^2_i\big ({{\varvec{e}}}_2 (\partial _1 S_{{\varvec{X}}_p}) \big ) = \big ({\mathbb {C}}{\varvec{\sigma }}^1({{\varvec{e}}}_3 S_{{\varvec{X}}_p})\big )_{i} \qquad \text { for } i = 1, \dots , N_1. \end{aligned}$$

In vector terms this writes \({\varvec{\sigma }}^2\big ({\mathrm{curl}}\, ({{\varvec{e}}}_3 S_{{\varvec{X}}_p}) \big ) = {\mathbb {C}}{\varvec{\sigma }}^1({{\varvec{e}}}_3 S_{{\varvec{X}}_p})\) which directly follows from the commuting diagram property as seen in Lemma 2. Thus (84) holds, which shows that \({\mathbb {J}}\) satisfies the Jacobi identity and is indeed a Poisson matrix and ends the proof.

4.4 Propagation in Time

Based on its Poisson structure, geometric time propagation schemes can be derived for our variational system in the same way as in [25]. This kind of splitting has originally been proposed for the Vlasov–Maxwell system in [21, 41] as a Hamiltonian splitting and later been constructed from a fully discrete action principle in [40]. An interesting feature of the resulting variational integrator is that it is explicit in time. Specifically, the discrete Hamiltonian (41) is split into five parts:

$$\begin{aligned} {\mathcal {H}}_{h, {\varvec{E}}} = \frac{1}{2} \int _{\varOmega } |{\varvec{E}}_h|^2 \, {\mathrm{d}}{\varvec{x}}, \qquad {\mathcal {H}}_{h, {\varvec{B}}} = \frac{1}{2} \int _{\varOmega } |{\varvec{B}}_h|^2 \, {\mathrm{d}}{\varvec{x}}\quad \text { and } \quad {\mathcal {H}}_{h, V_\alpha } = \sum _{p=1}^N \frac{m_p}{2} V^2_{p,\alpha } \qquad \end{aligned}$$

for \(\alpha =1,2,3\). The time equations (42) (or (79) in matrix form) are then solved separately for each of the partial Hamiltonians, and the complete solution is obtained by e.g. a Strang splitting combination. The resulting subsystems read

$$\begin{aligned} {\mathcal {H}}_{h, {\varvec{E}}}:&\qquad {\partial _{t}}{\varvec{B}}_h = - {\mathrm{curl}}_w {\varvec{E}}_h, \qquad \frac{\, {\mathrm{d}}{\varvec{V}}_p}{\, {\mathrm{d}}t} = \frac{q_p}{m_p} {\varvec{E}}^S({\varvec{X}}_p) \end{aligned}$$
(85)
$$\begin{aligned} {\mathcal {H}}_{h, {\varvec{B}}}:&\qquad {\partial _{t}}{\varvec{E}}_h = {\mathrm{curl}}\, {\varvec{B}}_h, \end{aligned}$$
(86)
$$\begin{aligned} {\mathcal {H}}_{h, V_\alpha }:&~ \frac{\, {\mathrm{d}}X_{p,\alpha }}{\, {\mathrm{d}}t} = V_{p,\alpha }, \quad \frac{\, {\mathrm{d}}V_{p,\alpha \pm 1}}{\, {\mathrm{d}}t} = {\mp } \frac{q_p}{m_p} V_{p,\alpha } B^S_{\alpha {\mp } 1}({\varvec{X}}_p), \quad {\partial _{t}}{\varvec{E}}_h = -{\varvec{J}}^S_{h,\alpha } \end{aligned}$$
(87)

where we have used a circular convention for the dimension components, and where \({\varvec{J}}^S_{h,\alpha } = \sum _{p = 1 \ldots N} q_p \varPi ^2( V_{p,\alpha } {{\varvec{e}}}_\alpha S_{{\varvec{X}}_p})\) is the projection of the current along dimension \(\alpha \), see (37). Equations (85) and (86) can be solved explicitly, and in (87) the equation for \(X_{p,\alpha }\) can also be solved explicitly, since \(V_{p,\alpha }\) remains constant in this split step. The remaining equations do not have a constant right-hand side but they can be solved by exact integration along the straight trajectories \({\varvec{X}}_{p}(t_m+\tau ) = {\varvec{X}}_{p} + \tau V_{p,\alpha } {{\varvec{e}}}_\alpha \). We refer to [25,  Sec. 5.1] where these equations are detailed for the weak Ampère case and delta shape functions, and to [11,  Sec. 4.5] where they are solved explicitely for a spectral solver with arbitrary shape functions.

On the other hand, energy-conserving time propagators can be derived by an antisymmetric splitting of the Poisson matrix combined with a suitable discrete-gradient time propagation of the substeps as explained in [23]. In our numerical experiments, we consider this energy- and Gauss-conserving discrete-gradient method which demonstrates the best the conservation properties of the phase-space discretization, and the Hamiltonian splitting just described, due to its simplicity.

5 Generalization and Application to the Strong Faraday Model

Before turning to the description of particular discretizations of Maxwell’s equations, it may be useful to pause for a moment and make some comments on the above findings. In our variational derivation we have explicitly required that (7) was a commuting diagram, and by doing so we have made two implicitly assumptions: first, we have considered that the discrete sequence involved strong differential operators, which corresponds to a conforming discretization. Second, we have referred to the operators \(\varPi ^\ell \) as projection operators. Although these are standard properties to assume, they played no particular role in our analysis, be it in the variational derivation of Sect. 2, or in the proof of its Hamiltonian structure. In particular, our results directly apply to a more general setting of the form

(88)

where the discrete differential operators \({\widetilde{{\mathrm{grad}}}}\), \({\widetilde{{\mathrm{curl}}}}\), \({\widetilde{{\mathrm{div}}}}\) no longer need to coincide with the exact ones (in particular, the discrete spaces \({\widetilde{V}}^\ell _h\) need not be conforming in \(H^1\), \(H({\mathrm{curl}})\) and \(H({\mathrm{div}})\)), and the \({\widetilde{\varPi }}^\ell \) no longer need to be projection operators. In this generalized setting the only assumptions are that:

  1. (i)

    the solid diagram in (88) commutes,

  2. (ii)

    the lower discrete differential are adjoint to the upper ones in the sense of (13), namely \( \int _\varOmega {\tilde{\varphi }}_h {\widetilde{{\mathrm{div}}}}_* {\tilde{{\varvec{F}}}}_h = -\int _\varOmega ({\widetilde{{\mathrm{grad}}}}\, {\tilde{\varphi }}_h)\cdot {\tilde{{\varvec{F}}}}_h \) must hold for all \({\tilde{\varphi }}_h \in {\widetilde{V}}^0_h\) and \({\tilde{{\varvec{F}}}}_h \in {\widetilde{V}}^1_h\), and so on.

Our variational derivation then applies verbatim, starting from the discrete Lagrangian

$$\begin{aligned} {\widetilde{{\mathcal {L}}}}_h({{\varvec{{\mathsf {X}}}}}_N, {{\varvec{{\mathsf {X}}}}}'_N, {{\varvec{{\mathsf {V}}}}}_N, {\tilde{{\varvec{A}}}}_h, {\tilde{{\varvec{A}}}}'_h, {\tilde{\phi }}_h)= & {} \sum _{p=1}^N \left( \big (m_p {\varvec{V}}_p + q_p {\tilde{{\varvec{A}}}}^S({\varvec{X}}_p)\big )\cdot {\varvec{X}}'_p - \Big (\frac{m_p}{2}{\varvec{V}}^2_p +q_p{\tilde{\phi }}^S({\varvec{X}}_p)\Big )\right) \\&+\frac{1}{2} \int _{\varOmega } |{\widetilde{{\mathrm{grad}}}}_* {\tilde{\phi }}_h({\varvec{x}}) + {\tilde{{\varvec{A}}}}'_h({\varvec{x}})|^2 \, {\mathrm{d}}{\varvec{x}}- \frac{1}{2}\int _{\varOmega } |{\widetilde{{\mathrm{curl}}}}_* {\tilde{{\varvec{A}}}}_h({\varvec{x}})|^2 \, {\mathrm{d}}{\varvec{x}}\end{aligned}$$

with particle arrays \({{\varvec{{\mathsf {X}}}}}_N, {{\varvec{{\mathsf {X}}}}}'_N, {{\varvec{{\mathsf {V}}}}}_N \in (\mathbb {R}^3)^N\), discrete fields \({\tilde{{\varvec{A}}}}_h, {\tilde{{\varvec{A}}}}'_h \in {\widetilde{V}}_h^2\), \({\tilde{\phi }}_h \in {\widetilde{V}}_h^3\) and coupling potentials defined as in (16). The resulting variational equations, analog to (37)–(40), read

$$\begin{aligned} \left\{ \begin{aligned} -&{\partial _{t}}{\tilde{{\varvec{E}}}}_h + {\widetilde{{\mathrm{curl}}}}\, {\tilde{{\varvec{B}}}}_h = {\widetilde{\varPi }}^2 {\varvec{J}}^S_N \\&{\partial _{t}}{\tilde{{\varvec{B}}}}_h + {\widetilde{{\mathrm{curl}}}}_* {\tilde{{\varvec{E}}}}_h = 0 \end{aligned} \right. \qquad \text{ and } \qquad \left\{ \begin{aligned}&\frac{\, {\mathrm{d}}{\varvec{X}}_p}{\, {\mathrm{d}}t} = {\varvec{V}}_p \\&\frac{\, {\mathrm{d}}{\varvec{V}}_p}{\, {\mathrm{d}}t} = \frac{q_p}{m_p} \big ({\tilde{{\varvec{E}}}}^S({\varvec{X}}_p) + {\varvec{V}}_p \times {\tilde{{\varvec{B}}}}^S({\varvec{X}}_p)\big ) \end{aligned} \right. \nonumber \\ \end{aligned}$$
(89)

with coupling fields defined similarly as in (39). Our analysis then shows that these general equations preserve both the corresponding discrete Gauss laws and the Hamiltonian, and that they have a discrete Poisson structure. This allows to extend our results to a wider range of discrete settings, including the structure-preserving DG-type Conga discretizations developed in [13, 14] where both \({\varvec{E}}\) and \({\varvec{B}}\) are represented in broken finite element spaces. Our results also apply to the discrete ansatz (11) corresponding to a strong Faraday equation. For this case we may consider a conforming (strong) discretization of the form (7), and set

$$\begin{aligned} {\widetilde{V}}_h^0 := V_h^3, \qquad {\widetilde{V}}_h^1 := V_h^2, \qquad {\widetilde{V}}_h^2 := V_h^1, \qquad {\widetilde{V}}_h^3 := V_h^0 \end{aligned}$$
(90)

so that the ansatz (11) takes a form similar to the one (12) considered above, namely

$$\begin{aligned} {\tilde{{\varvec{B}}}}_h \in {\widetilde{V}}_h^1 \xrightarrow { {~ {\widetilde{{\mathrm{grad}}}} ~}} {\tilde{{\varvec{E}}}}_h, {\tilde{{\varvec{A}}}}_h \in {\widetilde{V}}_h^2 \xrightarrow { {~ {\widetilde{{\mathrm{curl}}}} ~}} {\tilde{\phi }}_h \in {\widetilde{V}}_h^3. \end{aligned}$$
(91)

A commuting diagram (88) involving the spaces (90) can then be obtained as follows: define the commuting (upper) discrete differential operators as the weak operators (13), i.e.

$$\begin{aligned} {\widetilde{{\mathrm{grad}}}} := {\mathrm{grad}}_w, \qquad {\widetilde{{\mathrm{curl}}}} := {\mathrm{curl}}_w, \qquad {\widetilde{{\mathrm{div}}}} := {\mathrm{div}}_w, \end{aligned}$$

use the strong ones for the adjoint (lower) operators,

$$\begin{aligned} {\widetilde{{\mathrm{grad}}}}_* := {\mathrm{grad}}, \qquad {\widetilde{{\mathrm{curl}}}}_* := {\mathrm{curl}}, \qquad {\widetilde{{\mathrm{div}}}}_* := {\mathrm{div}}. \end{aligned}$$

and for the projection operators \({\widetilde{\varPi }}^\ell \) simply take the \(L^2\) projections on the discrete spaces,

$$\begin{aligned} \langle {\widetilde{\varPi }}^\ell G,G_h\rangle = \langle G,G_h\rangle \qquad \text { for } G \in V^\ell , ~~ G_h \in V^\ell _h. \end{aligned}$$

The commutation property is indeed easily verified: For the \({\mathrm{grad}}\) operator, using the embedding \({\mathrm{div}}: {\widetilde{V}}_h^1 = V_h^2 \rightarrow V_h^3 = {\widetilde{V}}_h^0\) and the characterization of \(L^2\) projections, we can write

$$\begin{aligned} \langle {\widetilde{\varPi }}^1 {\mathrm{grad}}\, \psi ,{\tilde{{\varvec{C}}}}_h\rangle = \langle {\mathrm{grad}}\, \psi ,{\tilde{{\varvec{C}}}}_h\rangle = -\langle \psi ,{\mathrm{div}}\, {\tilde{{\varvec{C}}}}_h\rangle = - \langle {\widetilde{\varPi }}^0 \psi ,{\mathrm{div}}\, {\tilde{{\varvec{C}}}}_h\rangle = \langle {\widetilde{{\mathrm{grad}}}} {\widetilde{\varPi }}^0 \psi ,{\tilde{{\varvec{C}}}}_h\rangle \end{aligned}$$

for all \(\psi \in V^0\) and \({\tilde{{\varvec{C}}}}_h \in {\widetilde{V}}_h^1\), which shows that \({\widetilde{\varPi }}^1 {\mathrm{grad}}= {\widetilde{{\mathrm{grad}}}}\, {\widetilde{\varPi }}^0\) holds on \(V^0\) (which may be taken here as \(H^1(\varOmega )\)). The same argument also applies for the operators \({\mathrm{curl}}\) and \({\mathrm{div}}\). With this construction one recovers the Hamiltonian particle method of [25], with general shape functions. The discrete Poisson matrix thus takes the same form, with particle-field coupling terms encoded in block matrices , \(\ell = 1,2\), with generic \((3 \times 1)\) blocks

(92)

which extend the corresponding matrices in [25] to the case of a general shape function S.

6 Application to Tensor-Product Spline and Fourier Field Solvers

In this section, we apply the above method to the case of tensor-product finite element spaces defined on cartesian domains. Following the interpolation/histopolation approach of [18, 26], we review a general method for designing commuting diagrams, which is based on geometric degrees of freedom that can then be associated to finite element spaces of various types. In this article, we detail two applications, one using splines and another one using truncated Fourier spaces.

6.1 Geometric Degrees of Freedom with Commuting Properties

Let us equip the cartesian domain \(\varOmega = [0,L]^3\) with a tensor-product grid using \(M_\alpha \) nodes along each dimension \(\alpha \),

$$\begin{aligned} {\varvec{x}}_{\varvec{m}}= (x_{1,m_1}, x_{2,m_2}, x_{3,m_3}) \qquad \text { with } ~ {\varvec{m}}\in \llbracket 1, {\varvec{M}} \rrbracket := \prod _{\alpha = 1}^3 \llbracket 1, M_\alpha \rrbracket . \end{aligned}$$
(93)

On this mesh, we consider evaluation functionals defined on the various geometric elements:

  • point evaluations on the nodes

    $$\begin{aligned} {\mathscr {P}}_{\varvec{m}}(G) := G({\varvec{x}}_{\varvec{m}}), \end{aligned}$$
    (94)
  • edge integrals along some dimension \(1\le \alpha \le 3\),

    $$\begin{aligned} {\mathscr {E}}_{\alpha ,{\varvec{m}}}(G) := \int _{{\texttt {e}}_{\alpha , {\varvec{m}}}} G \quad \text { with } \quad {\texttt {e}}_{\alpha ,{\varvec{m}}} = [{\varvec{x}}_{{\varvec{m}}-{\varvec{e}}_\alpha }, {\varvec{x}}_{\varvec{m}}], \end{aligned}$$
    (95)
  • face integrals normal to some dimension \(1\le \alpha \le 3\),

    $$\begin{aligned} {\mathscr {F}}_{\alpha ,{\varvec{m}}}(G) := \int _{{\texttt {f}}_{\alpha ,{\varvec{m}}}} G \quad \text { with } \quad {\texttt {f}}_{\alpha , {\varvec{m}}} = [{\texttt {e}}_{\alpha +1, {\varvec{m}}-{\varvec{e}}_{\alpha -1}}, {\texttt {e}}_{\alpha +1,{\varvec{m}}}], \end{aligned}$$
    (96)

    s

  • and cell integrals

    $$\begin{aligned} {\mathscr {C}}_{{\varvec{m}}}(G) := \int _{{\texttt {c}}_{{\varvec{m}}}} G \quad \text { with } \quad {\texttt {c}}_{{\varvec{m}}} = [{\texttt {f}}_{1,{\varvec{m}}-{\varvec{e}}_{1}}, {\texttt {f}}_{1,{\varvec{m}}}], \end{aligned}$$
    (97)

where we have denoted by [ab] the convex hull of \(a \cup b\). A set of “geometric” degrees of freedom can then be derived from these local functionals:

$$\begin{aligned} \left\{ \begin{aligned}&{\hat{\sigma }}^0_{{\varvec{m}}}(\varphi ) := {\mathscr {P}}_{\varvec{m}}(\varphi ) \quad&\text { for } \varphi \in V^0 \\&{\hat{\sigma }}^1_{\alpha , {\varvec{m}}}({\varvec{C}}) := {\mathscr {E}}_{\alpha ,{\varvec{m}}}({\varvec{C}}\cdot {{\varvec{e}}}_\alpha ) \quad&\text { for } {\varvec{C}}\in V^1 \\&{\hat{\sigma }}^2_{\alpha , {\varvec{m}}}({\varvec{F}}) := {\mathscr {F}}_{\alpha ,{\varvec{m}}}({\varvec{F}}\cdot {{\varvec{e}}}_\alpha ) \quad&\text { for } {\varvec{F}}\in V^2 \\&{\hat{\sigma }}^3_{{\varvec{m}}}(g) := {\mathscr {C}}_{{\varvec{m}}}(g) \quad&\text { for } g \in V^3 \end{aligned}\right. \quad \text { and for } ~ \alpha \in \llbracket 1, 3 \rrbracket , ~ {\varvec{m}}\in \llbracket 1, {\varvec{M}} \rrbracket . \end{aligned}$$
(98)

If these degrees of freedom are associated to spaces \(V_h^\ell \), \(0 \le \ell \le 3\), of respective dimensions

$$\begin{aligned} N_0 = N_3 = M \qquad \text { and } \qquad N_1 = N_2 = 3 M, \qquad \text { with } \qquad M := M_1M_2M_3, \end{aligned}$$
(99)

and for which they are unisolvent, then they define a unique set of dual basis functions \({\hat{\varLambda }}^\ell _i\) according to (61), which may also be called “geometric”: for the space \(V_h^0\) for example these basis functions correspond to the interpolatory basis associated with the nodes \({\varvec{x}}_{\varvec{m}}\), for the space \(V_h^3\) they correspond to histopolation basis functions, and for the intermediate spaces they involve a combination of both. A key property of this construction is the following.

Lemma 3

The degrees of freedom defined by (98) are well-defined on the domains

$$\begin{aligned} V^0= & {} W^{1}_{\mathrm{per, 1,2,3}}, \quad V^1 = W^{1}_{\mathrm{per,2,3}} \times W^{1}_{\mathrm{per,3,1}} \times W^{1}_{\mathrm{per,1,2}}, \\ V^2= & {} W^{1}_{\mathrm{per,1}} \times W^{1}_{\mathrm{per,2}} \times W^{1}_{\mathrm{per,3}}, \quad V^3 = L^1_{\mathrm{per}}, \end{aligned}$$

where we have denoted by \(L^1_{\mathrm{per}}\) the space of L-periodic and locally \(L^1\) functions, and by

$$\begin{aligned} \left\{ \begin{aligned}&W^{1}_{\mathrm{per, 1,2,3}} := \{ G \in L^1_{\mathrm{per}} : \partial _1 \partial _2 \partial _3 G \in L^1_{\mathrm{per}}\}\\&W^{1}_{\mathrm{per, \alpha , \beta }} := \{ G \in L^1_{\mathrm{per}} : \partial _\alpha \partial _\beta G \in L^1_{\mathrm{per}} \}\\&W^{1}_{\mathrm{per, \alpha }} := \{ G \in L^1_{\mathrm{per}} : \partial _\alpha G \in L^1_{\mathrm{per}}\} \end{aligned} \right. \end{aligned}$$
(100)

anisotropic Sobolev spaces of \(W^{s,1}\) type. Moreover if the \({\hat{{{{\varvec{{\sigma }}}}}}}^\ell \) are unisolvent on the spaces \(V_h^\ell \), then the resulting projection operators \({\hat{\varPi }}^\ell \) characterized by the relations (65), namely

$$\begin{aligned} \left\{ \begin{aligned}&{\hat{\sigma }}^0_{{\varvec{m}}}({\hat{\varPi }}^0\varphi ) = {\hat{\sigma }}^0_{{\varvec{m}}}(\varphi ) \\&{\hat{\sigma }}^1_{\alpha , {\varvec{m}}}({\hat{\varPi }}^1{\varvec{C}}) = {\hat{\sigma }}^1_{\alpha , {\varvec{m}}}({\varvec{C}}) \\&{\hat{\sigma }}^2_{\alpha , {\varvec{m}}}({\hat{\varPi }}^2{\varvec{F}}) = {\hat{\sigma }}^2_{\alpha , {\varvec{m}}}({\varvec{F}}) \\&{\hat{\sigma }}^3_{{\varvec{m}}}({\hat{\varPi }}^3 g) = {\hat{\sigma }}^3_{{\varvec{m}}}(g) \end{aligned}\right. \qquad \text { for all } \alpha \in \llbracket 1, 3 \rrbracket , ~ {\varvec{m}}\in \llbracket 1, {\varvec{M}} \rrbracket , \end{aligned}$$

satisfy the commuting diagram property

$$\begin{aligned} d^\ell \varPi ^\ell G = \varPi ^{\ell +1} d^\ell G \quad \text { for all } G \in V^\ell . \end{aligned}$$

Proof

The fact that these degrees of freedom are well-defined on the above domains follows from standard Sobolev inequalities, see e.g. [8,  Rem. 13]. The commuting diagram properties are then easy to verify by applying the Stokes formula and Lemma 2. For the gradient for instance, we consider some \(\varphi \in V^0\) and compute

$$\begin{aligned} {\hat{\sigma }}^1_{{\varvec{m}},\alpha }({\mathrm{grad}}\, \varphi ) = \int _{{\texttt {e}}_{{\varvec{m}},\alpha }} {\varvec{e}}_\alpha \cdot {\mathrm{grad}}\, \varphi = \varphi ({\varvec{x}}_{\varvec{m}}) - \varphi ({\varvec{x}}_{{\varvec{m}}-{\varvec{e}}_\alpha }) = {\hat{\sigma }}^0_{{\varvec{m}}}(\varphi ) - {\hat{\sigma }}^0_{{\varvec{m}}-{\varvec{e}}_\alpha }(\varphi ). \end{aligned}$$

According to Lemma 2, this specifies the gradient matrix \({\hat{{\mathbb {D}}}}^0 \in \mathbb {R}^{N_1 \times N_0}\) such that

$$\begin{aligned} {\hat{{{{\varvec{{\sigma }}}}}}}^1({\mathrm{grad}}\, \varphi ) = {\hat{{\mathbb {D}}}}^0 {\hat{{{{\varvec{{\sigma }}}}}}}^0(\varphi ) \end{aligned}$$

and also implies \({\mathrm{grad}}\, {\hat{\varPi }}^0 \varphi = {\hat{\varPi }}^1 {\mathrm{grad}}\, \varphi \). The same argument works for the other operators. \(\square \)

In the construction above, we see that the commuting properties rely only on the geometric nature of the degrees of freedom, and not on the tensor-product structure of the grid. However, this tensor-product structure allows us to specify the form of the differential matrices. Setting \(\varphi = {\hat{\varLambda }}^0_{{\varvec{k}}}\) in the proof of Lemma 3, we find indeed the following representation of \({\hat{{\mathbb {D}}}}^0\)

$$\begin{aligned} {\hat{{\mathbb {D}}}}^0 = \begin{pmatrix} {\mathbb {I}}_{M_3} \otimes {\mathbb {I}}_{M_2} \otimes \mathbb {d}_1 \\ {\mathbb {I}}_{M_3} \otimes \mathbb {d}_2 \otimes {\mathbb {I}}_{M_1} \\ \mathbb {d}_3 \otimes {\mathbb {I}}_{M_2} \otimes {\mathbb {I}}_{M_1} \end{pmatrix}, \end{aligned}$$
(101)

where \({\mathbb {I}}_{M_\alpha }\) is the identity matrix of size \(M_\alpha \times M_\alpha \), \(\mathbb {d}_{\alpha }\) is a univariate differential matrix

$$\begin{aligned} \mathbb {d}_{\alpha } = \begin{pmatrix} 1 &{} 0 &{} \ldots &{}&{} 0 &{} -1 \\ -1 &{} 1 &{} 0 &{} &{} &{} \\ 0 &{} -1 &{} 1 &{} 0 &{} &{}\\ &{} \ddots &{} \ddots &{} \ddots &{} \ddots &{}\\ &{}&{} 0 &{} -1 &{} 1 &{} 0 \\ &{}&{}&{} 0&{} -1 &{} 1 \\ \end{pmatrix} \in \mathbb {R}^{M_{\alpha } \times M_{\alpha }}, \quad \alpha \in \llbracket 1, 3 \rrbracket \end{aligned}$$
(102)

and the Kronecker matrix product is defined as \( (\mathbb {c} \otimes \mathbb {b} \otimes \mathbb {a})_{{\varvec{m}},{\varvec{n}}} = \mathbb {c}_{m_3,n_3}\mathbb {b}_{m_2,n_2}\mathbb {a}_{m_1,n_1}. \) In the same way, we find

$$\begin{aligned} {\hat{{\mathbb {D}}}}^1 = \begin{pmatrix} {\mathbb {O}}_{M} &{} - \mathbb {d}_{3} \otimes {\mathbb {I}}_{M_2} \otimes {\mathbb {I}}_{M_1} &{} {\mathbb {I}}_{M_3} \otimes \mathbb {d}_{2} \otimes {\mathbb {I}}_{M_3}\\ \mathbb {d}_{3} \otimes {\mathbb {I}}_{M_2} \otimes {\mathbb {I}}_{M_1} &{} {\mathbb {O}}_{M} &{} -{\mathbb {I}}_{M_3} \otimes {\mathbb {I}}_{M_2} \otimes \mathbb {d}_{1}\\ -{\mathbb {I}}_{M_3} \otimes \mathbb {d}_{2} \otimes {\mathbb {I}}_{M_1} &{} {\mathbb {I}}_{M_3} \otimes {\mathbb {I}}_{M_2} \otimes \mathbb {d}_{1} &{} {\mathbb {O}}_{M} \\ \end{pmatrix} \quad \text { and } \quad {\hat{{\mathbb {D}}}}^2 = \left( {\hat{{\mathbb {D}}}}^0\right) ^\top \nonumber \\ \end{aligned}$$
(103)

where \({\mathbb {O}}_{M}\) denotes the zero square matrix of size \(M=M_1M_2M_3\). In practice, the basis functions \({\hat{\varLambda }}^\ell _i\) defined by the geometric degrees of freedom according to (61) may not be the most convenient to use, either because they have no simple expression, or because some other basis \(\varLambda ^\ell _i\) has better locality properties, or leads to simpler discrete Maxwell equations. One then needs to determine the coefficients of the geometric projections in this new practical basis, which amounts to finding degrees of freedom \(\sigma ^\ell _i\) that are dual to the practical basis functions and lead to the same projection operator \(\varPi ^\ell = {\hat{\varPi }}^\ell \) as the geometric ones. Using the stacked vector notation introduced in Sect. 4.1 for the geometric basis and the practical basis , these new degrees of freedom \({{{\varvec{{\sigma }}}}}^\ell \) are characterized by the relations

Introducing the matrix such that , this yields

$$\begin{aligned} {{{\varvec{{\sigma }}}}}^\ell (G) = ({\mathbb {K}}^\ell )^{-1} {\hat{{{{\varvec{{\sigma }}}}}}}^\ell (G), \end{aligned}$$

which gives a practical formula for computing the coefficients of the geometric projections in the practical basis. Accordingly, the differential matrices in this new basis read

Note that \({\mathbb {K}}^0\) is a Vandermonde matrix when is a monomial basis. For this reason the matrices \({\mathbb {K}}^\ell \) are sometimes referred to as a generalized Vandermonde matrices.

6.2 Compatible Finite Elements Based on B-Splines

Compatible finite elements based on splines on a Cartesian grid have been studied by Buffa, Sangalli, Vázquez and co-authors, see e.g. [9, 10], and in [25] they have been used to implement the strong Faraday GEMPIC formulation. Here we describe how spline spaces can be used in conjunction with the geometric degrees of freedom described in Sect. 6.1.

For simplicity, we consider periodic boundaries and regular knot sequences with \(M_\alpha \) knots per dimension. Denoting by \(N^{p}_{\alpha ,k}\) the univariate B-spline of degree p along \(x_\alpha \), associated with the knots \((k h_\alpha , \dots , (k+p+1) h_\alpha )\) where \(h_\alpha = \frac{L}{M_\alpha }\), see e.g. [35], the first space in the sequence consists of tensor-product splines of multi-variate degree \((p_1, p_2, p_3)\), namely

$$\begin{aligned} V^0_h = \mathbb {S}_{p_1,p_2,p_3} := {\mathrm{Span\,}}\Big ( \big \{\varLambda ^0_{{\varvec{k}}} : {\varvec{k}}\in \llbracket 1, {\varvec{M}} \rrbracket \big \} \Big ) \qquad \text { with } \qquad \varLambda ^0_{{\varvec{k}}}({\varvec{x}}) := \prod _{\alpha = 1}^3 N^{p_\alpha }_{\alpha ,k_\alpha }(x_\alpha ) \end{aligned}$$

and the full sequence reads (writing \(p' = p-1\))

$$\begin{aligned} V^0_h \xrightarrow { {~ {\mathrm{grad}}~} } V^1_h = \begin{pmatrix} \mathbb {S}_{p_1',p_2,p_3} \\ \mathbb {S}_{p_1,p_2',p_3} \\ \mathbb {S}_{p_1,p_2,p_3'} \end{pmatrix} \xrightarrow { {~ {\mathrm{curl}}~} } V^2_h = \begin{pmatrix} \mathbb {S}_{p_1,p_2',p_3'} \\ \mathbb {S}_{p_1',p_2,p_3'} \\ \mathbb {S}_{p_1',p_2',p_3}\end{pmatrix} \xrightarrow { {~ {\mathrm{div}}~} } V^3_h = \mathbb {S}_{p_1',p_2',p_3'}. \end{aligned}$$

The fact that this is indeed a sequence follows from the well-known relation

$$\begin{aligned} \frac{\mathrm {d}}{\mathrm {d} x_\alpha } N^p_{\alpha , k} = \frac{1}{h_\alpha }\big (N^{p-1}_{\alpha ,k} - N^{p-1}_{\alpha , k+1}\big ). \end{aligned}$$
(104)

Introducing for convenience the scaled B-splines along \(x_\alpha \),

$$\begin{aligned} D^p_{\alpha ,k} = \frac{1}{h_\alpha } N^{p-1}_{\alpha ,k} \end{aligned}$$
(105)

yields a particularly simple formula for the derivative operator in the corresponding basis. In particular, it makes it convenient to equip the vector-valued spaces \(V^1_h\), \(V^2_h\) with the basis functions

$$\begin{aligned} {\varvec{\varLambda }}^1_{\alpha , {\varvec{k}}}({\varvec{x}}):= & {} {{\varvec{e}}}_\alpha D^{p_\alpha }_{\alpha ,k_\alpha }(x_\alpha ) \prod _{\beta \ne \alpha } N^{p_\beta }_{\beta ,k_\beta }(x_\beta ) \qquad \text { for } ~ \alpha \in \llbracket 1, 3 \rrbracket , ~ {\varvec{k}}\in \llbracket 1, {\varvec{M}} \rrbracket ,\\ {\varvec{\varLambda }}^2_{\alpha , {\varvec{k}}}({\varvec{x}}):= & {} {{\varvec{e}}}_\alpha N^{p_\alpha }_{\alpha ,k_\alpha }(x_\alpha ) \prod _{\beta \ne \alpha } D^{p_\beta }_{\beta ,k_\beta }(x_\beta ) \qquad \text { for } ~ \alpha \in \llbracket 1, 3 \rrbracket , ~ {\varvec{k}}\in \llbracket 1, {\varvec{M}} \rrbracket , \end{aligned}$$

and the last, scalar-valued space \(V^3_h\) with

$$\begin{aligned} \varLambda ^3_{{\varvec{k}}}({\varvec{x}}) := \prod _{\alpha =1}^{3} D^{p_\alpha }_{\alpha ,k_\alpha }(x_\alpha ) \qquad \text { for } {\varvec{k}}\in \llbracket 1, {\varvec{M}} \rrbracket . \end{aligned}$$

In practice, B-splines are appealing because of their minimal support property, however they are not dual to the geometric degrees of freedom defined in (98) so that new degrees of freedom must be computed as described at the end of Sect. 6.1. For the nodal degrees of freedom, the change of basis matrix reads

$$\begin{aligned} {\mathbb {K}}^0_{{\varvec{m}}, {\varvec{k}}} = {\hat{\sigma }}^0_{\varvec{m}}(\varLambda _{\varvec{k}}^0) = \varLambda _{\varvec{k}}^0({\varvec{x}}_{\varvec{m}}) \end{aligned}$$
(106)

and a common choice of interpolation nodes \({\varvec{x}}_{\varvec{m}}\) consists of Greville points, which coincide with the knot sequence for regular splines of odd degrees, and with their midpoints for even degrees. More generally, we observe that \({\mathbb {K}}^0\) is invertible as long as the degrees of freedom \({{{\varvec{{\sigma }}}}}^0\) are unisolvent, which holds iff the grid satisfies the spline interpolation condition, see e.g. [35, Th. 4.61]. Using the tensor-product structure and the locality of the B-splines, we see that \({\mathbb {K}}^0\) is the Kronecker product of three banded matrices, which are also circulant for regular Greville points. Moreover, as B-splines satisfy by construction

$$\begin{aligned} N^p_{\alpha ,k}(x) = \int _{x-h_\alpha }^x D_{\alpha ,k}^{p}(y) \, {\mathrm{d}}y, \end{aligned}$$
(107)

see (104), (105), we have

$$\begin{aligned} \begin{aligned} {\hat{\sigma }}^1_{\alpha , {\varvec{m}}}({\varvec{\varLambda }}^1_{\alpha ,{\varvec{k}}})&= {\mathscr {E}}_{\alpha ,{\varvec{m}}}( {\varvec{\varLambda }}^1_{\alpha ,{\varvec{k}}}\cdot {{\varvec{e}}}_\alpha ) = \int _{(m_\alpha -1)h_\alpha }^{m_\alpha h_\alpha } \!\! D^{p_\alpha }_{\alpha ,k_\alpha }(x) \, {\mathrm{d}}x \prod _{\beta \ne \alpha } N^{p_\beta }_{\beta ,k_\beta }(m_\beta h_\beta ) \\&= \varLambda ^0_{\varvec{k}}({\varvec{x}}_{\varvec{m}}) = {\hat{\sigma }}^0_{\varvec{m}}(\varLambda _{\varvec{k}}^0) \end{aligned} \end{aligned}$$

hence the matrix block \({\mathbb {K}}^{1,\alpha } = \big ({\mathbb {K}}^1_{(\alpha ,{\varvec{m}}),(\alpha ,{\varvec{k}})}\big )_{{\varvec{m}},{\varvec{k}}}\) coincides with \({\mathbb {K}}^0\), the other blocks of \({\mathbb {K}}^1\) being clearly zero. Similarly we find that \({\mathbb {K}}^3\) and \({\mathbb {K}}^{2,\alpha }\) also coincide with \({\mathbb {K}}^0\), so that (with obvious notation)

$$\begin{aligned} \left\{ \begin{aligned}&{{{\varvec{{\sigma }}}}}^0(\varphi ) = \left( {\mathbb {K}}^0\right) ^{-1} {\hat{{{{\varvec{{\sigma }}}}}}}(\varphi ), \\&{{{\varvec{{\sigma }}}}}^{1,\alpha }({\varvec{C}}) = \left( {\mathbb {K}}^0\right) ^{-1} {\hat{{{{\varvec{{\sigma }}}}}}}^{1,\alpha }({\varvec{C}}), \\&{{{\varvec{{\sigma }}}}}^{2,\alpha }({\varvec{F}}) =\left( {\mathbb {K}}^0\right) ^{-1} {\hat{{{{\varvec{{\sigma }}}}}}}^{2,\alpha }({\varvec{F}}), \\&{{{\varvec{{\sigma }}}}}^{3}(g) = \left( {\mathbb {K}}^0 \right) ^{-1} {\hat{{{{\varvec{{\sigma }}}}}}}^3(g). \end{aligned}\right. \end{aligned}$$

From relation (104) we also see that the one-dimensional derivative matrices—and hence, every \({\mathbb {D}}^\ell \)—are the same as for the geometric basis. As for the three-dimensional mass matrices, they are the Kronecker product of the one-dimensional mass matrices which are a circulant matrices with \(2p_{\alpha }+1\) non-zero entries per row in each dimension. Finally we note that the discrete interior products (47) based on the directional averaging operator (58) may be evaluated using the relation (107), writing e.g.

$$\begin{aligned} I^0_{{{\varvec{e}}}_\alpha } {\varvec{\varLambda }}^1_{\beta ,{\varvec{k}}} ({\varvec{x}})= & {} {\mathcal {A}}_{h,\alpha } ({\varvec{\varLambda }}^1_{\beta ,{\varvec{k}}}\cdot {{\varvec{e}}}_\alpha )({\varvec{x}}) = \frac{\delta _{\alpha , \beta } }{2h_\alpha } \int _{x_\alpha -h_\alpha }^{x_\alpha +h_\alpha } \!\! D^{p_\alpha }_{\alpha ,k_\alpha } \prod _{\gamma \ne \alpha } N^{p_\gamma }_{\gamma ,k_\gamma }(x_\gamma )\\= & {} \frac{\delta _{\alpha , \beta } }{2h_\alpha }\left( \varLambda ^0_{{\varvec{k}}-{{\varvec{e}}}_\alpha } + \varLambda ^0_{{\varvec{k}}}\right) ({\varvec{x}}). \end{aligned}$$

6.3 Compatible Finite Elements Based on Fourier Spaces

With periodic boundary conditions, another option is to consider a sequence of compatible finite elements made of discrete Fourier spaces. Such spectral elements are very common in particle solvers, with particle-field interaction usually based on discrete Fourier transforms and FFT algorithms. Here we describe a coupling based on the geometric degrees of freedom described in Sect. 6.1. To match the dimensions of the grid, we consider spaces with \(M_\alpha = 2K_\alpha + 1\) modes per dimension, of the form

$$\begin{aligned} V^0_h = V^1_h = {\mathrm{Span\,}}\Big ( \big \{\varLambda ^0_{{\varvec{k}}} : {\varvec{k}}\in \llbracket -{\varvec{K}}, {\varvec{K}} \rrbracket \big \} \Big ) \qquad \text { with } \qquad \varLambda ^0_{{\varvec{k}}}({\varvec{x}}) := {\mathrm {e}}^{\frac{2 {\mathrm {i}}\pi {\varvec{k}}\cdot {\varvec{x}}}{L}} = \prod _{\alpha = 1}^3 {\mathrm {e}}^{\frac{2 {\mathrm {i}}\pi k_\alpha x_\alpha }{L}}, \end{aligned}$$

where we have denoted \(\llbracket -{\varvec{K}}, {\varvec{K}} \rrbracket = \prod _{\alpha =1}^3 \llbracket -K_\alpha , K_\alpha \rrbracket \), and

$$\begin{aligned} V^2_h = V^3_h = {\mathrm{Span\,}}\Big ( \big \{ {\varvec{\varLambda }}^2_{\alpha {\varvec{k}}} : \alpha \in \llbracket 1, 3 \rrbracket , ~ {\varvec{k}}\in \llbracket 1, {\varvec{M}} \rrbracket \big \} \Big ) \qquad \text { with } \qquad {\varvec{\varLambda }}^2_{\alpha , {\varvec{k}}}({\varvec{x}}) := {{\varvec{e}}}_\alpha \varLambda ^0_{{\varvec{k}}}({\varvec{x}}). \end{aligned}$$

These discrete spaces clearly form a de Rham sequence, as the derivative of a Fourier mode is the same mode up to a complex scaling factor.

One interesting feature of the canonical modal basis is that it leads to diagonal Maxwell equations. Indeed the differential matrices \({\mathbb {D}}^\ell \) have the same simple block and Kronecker-product structure as (101)–(103), here with diagonal one-dimensional derivative matrices

$$\begin{aligned} \mathbb {d}^{\alpha } = \frac{2{\mathrm {i}}\pi }{L_{\alpha }} {\mathrm{diag\,}}\big ( - K_\alpha , \ldots , 0, \ldots , K_{\alpha }\big ), \end{aligned}$$

and the mass matrices are all diagonal due to the orthogonality of the basis functions, with \({\mathbb {M}}^{\ell } = L^3 {\mathbb {I}}_{N_\ell }\) for the chosen normalization.

However, as the modal basis is not dual to the geometric degrees of freedom from Sect. 6.1, we need to determine the proper change of basis formulas in order to apply the geometric interpolation-histopolation projections \({\hat{\varPi }}^\ell \), as we did for the B-splines in the previous section. To do so, it is convenient to consider regular interpolation nodes \({\varvec{x}}_{\varvec{m}}= (m_1 h_1, m_2 h_2, m_3 h_3)\), with \(h_\alpha = \frac{L}{M_\alpha }\). The nodal change of basis matrix reads then

$$\begin{aligned} {\mathbb {K}}^0_{{\varvec{m}},{\varvec{k}}} = {\hat{\sigma }}^0_{\varvec{m}}(\varLambda _{\varvec{k}}) = \varLambda _{\varvec{k}}({\varvec{x}}_{\varvec{m}}) = \prod _{\alpha =1}^3 {\mathrm {e}}^{\frac{2 {\mathrm {i}}\pi k_\alpha m_\alpha }{M_\alpha }} \end{aligned}$$

which is a standard DFT matrix as well as its inverse,

$$\begin{aligned} ({\mathbb {K}}^0)^{-1} = \left( \frac{1}{M} \prod _{\alpha = 1}^3{\mathrm {e}}^{-\frac{2 {\mathrm {i}}\pi k_\alpha m_\alpha }{M_\alpha }}\right) _{{\varvec{k}},{\varvec{m}}} = \frac{1}{M} \big ({\mathbb {K}}^0\big )^* =: {\mathbb {F}}\end{aligned}$$

where we remind that \(M = M_1M_2M_3\), see (99). The interpolation operator in the modal basis then takes the well-known form

For the other projections in the sequence we proceed similarly as in Sect. 6.2, noting that

$$\begin{aligned} \int _{(m_{\alpha }-1)h_{\alpha }}^{m_\alpha h_\alpha } {\mathrm {e}}^{\frac{2{\mathrm {i}}\pi k_{\alpha } x_{\alpha }}{L}} \, {\mathrm{d}}x_{\alpha } = T^\alpha _{k_\alpha } {\mathrm {e}}^{\frac{2{\mathrm {i}}\pi k_{\alpha } m_{\alpha }}{M_\alpha }} \qquad \text { with } \qquad T^\alpha _{k_\alpha } := {\left\{ \begin{array}{ll} h_\alpha &{} \text {if } k_{\alpha }=0, \\ \frac{L}{2 {\mathrm {i}}\pi k_\alpha } \left( 1-{\mathrm {e}}^{-\frac{2 {\mathrm {i}}\pi k_\alpha }{M_\alpha }}\right) &{}\text {else}. \end{array}\right. } \end{aligned}$$

In particular, writing \( {\mathbb {T}}^\alpha := {\mathrm{diag\,}}\big ({\mathbb {T}}^\alpha _{{\varvec{k}}, {\varvec{k}}} = T^\alpha _{k_\alpha } : {\varvec{k}}\in \llbracket -{\varvec{K}}, {\varvec{K}} \rrbracket \big ) \) we find \({\mathbb {K}}^{1,\alpha } = {\mathbb {K}}^0 {\mathbb {T}}^\alpha \) for the matrix block \( {\mathbb {K}}^{1,\alpha } = \big ({\mathbb {K}}^1_{(\alpha ,{\varvec{m}}),(\alpha ,{\varvec{k}})}\big )_{{\varvec{m}},{\varvec{k}}} \), and similarly \({\mathbb {K}}^{2,\alpha } = {\mathbb {K}}^0 {\mathbb {T}}^{\alpha -1}{\mathbb {T}}^{\alpha +1}\) and \({\mathbb {K}}^{3} = {\mathbb {K}}^0 {\mathbb {T}}^1{\mathbb {T}}^2{\mathbb {T}}^3\). The expression of the different degrees of freedom in the modal Fourier basis reads then

$$\begin{aligned} \left\{ \begin{aligned}&{{{\varvec{{\sigma }}}}}^0(\varphi ) = {\mathbb {F}}{\hat{{{{\varvec{{\sigma }}}}}}}^0(\varphi ), \\&{{{\varvec{{\sigma }}}}}^{1,\alpha }({\varvec{C}}) = \left( {\mathbb {T}}^{\alpha }\right) ^{-1} {\mathbb {F}}{\hat{{{{\varvec{{\sigma }}}}}}}^{1,\alpha }({\varvec{C}}), \\&{{{\varvec{{\sigma }}}}}^{2,\alpha }({\varvec{F}}) = \left( {\mathbb {T}}^{\alpha -1}{\mathbb {T}}^{\alpha +1}\right) ^{-1} {\mathbb {F}}{\hat{{{{\varvec{{\sigma }}}}}}}^{2,\alpha }({\varvec{F}}), \\&{{{\varvec{{\sigma }}}}}^3(g) = \left( {\mathbb {T}}^{1}{\mathbb {T}}^{2}{\mathbb {T}}^{3}\right) ^{-1} {\mathbb {F}}{\hat{{{{\varvec{{\sigma }}}}}}}^{3}(g), \end{aligned}\right. \end{aligned}$$

where we note that all the \({\mathbb {T}}^\alpha \) matrices are clearly diagonal and invertible. To apply the discrete interior products (47) based on directional averaging (58), we finally need to evaluate

$$\begin{aligned} ({\mathcal {A}}_{h,\alpha } \varLambda ^0_{{\varvec{k}}})({\varvec{x}}) = \frac{1}{2h_\alpha } \int _{x_\alpha -h_\alpha }^{x_\alpha +h_\alpha } {\mathrm {e}}^{\frac{2{\mathrm {i}}\pi {\varvec{k}}\cdot {\varvec{x}}}{L}} \, {\mathrm{d}}{\varvec{x}}= {{\,\mathrm{sinc\,}\,}}\Big (\frac{2\pi k_{\alpha }}{M_\alpha }\Big ) \varLambda ^0_{{\varvec{k}}}({\varvec{x}}) \end{aligned}$$

for all \(\alpha \in \llbracket 1, 3 \rrbracket \) and \({\varvec{k}}\in \llbracket -{\varvec{K}}, {\varvec{K}} \rrbracket \).

7 Numerical Illustration in Reduced Phase Space

In this section we illustrate the method on academic test-cases. We point out that in real-life applications, energy-preserving schemes are usually required for the simulation of long time scales whereas momentum-conserving schemes are often more relevant for the accurate description of fast phenomena. Here we shall restrict ourselves to the verification of the main conservation properties, and study the influence of several parameters in simple configurations. All results are obtained with an implementation of the strong Ampère scheme within the SeLaLib library [38]. We study the variational semi-discretization as derived in Sect. 2—which is energy conserving—as well as the momentum-preserving semi-discretization as derived in Sect. 3. For the basis of the finite element field solver, both splines and Fourier modes are considered. The shape function is chosen to be a B-spline of varying degree.

As for the time discretization, we compare a Hamiltonian splitting scheme for both space discretization methods, see Sect. 4.4. Only when considering the conservation properties we also provide results for the variational scheme with an energy-conserving discrete gradient time discretization. We use a time step of \(\varDelta t = 0.05\), the linear solvers use a tolerance of \(10^{-15}\) and the nonlinear iterations in the discrete gradient method have a tolerance of \(10^{-12}\). Here we have chosen a rather small time step as the primary interest of this section is a study of the spatial discretization.

7.1 Physical Model

For the numerical study we consider a reduced phase space with one periodic spatial and one or two velocity dimensions, namely \({\varvec{x}}=x_1 \in [0,L_1)\), \({\varvec{v}}=(v_1,v_2) \in \mathbb {R}^2\), with unknowns of the form

$$\begin{aligned} f = f(t,x_1,v_1,v_2), \qquad {\varvec{E}}= ( E_1(t, x_1), E_2(t, x_1) ), \qquad {\varvec{B}}= B_3(t, x_1). \end{aligned}$$

Moreover, we simulate an electron distribution in a neutralizing ion background, which differs from the multi-species Vlasov–Maxwell system in that the average current is substracted from the total one in order for the model to be momentum preserving. In particular, the reduced Maxwell system then reads

$$\begin{aligned} \left\{ \begin{aligned}&\frac{\partial E_1(t,x_1)}{\partial t} = -J_1(t,x_1) + \frac{1}{L_1} \int _0^{L_1} J_1(t,y_1) \, \text {d} y_1\\&\frac{\partial E_2(t,x_1)}{\partial t} + \frac{\partial B_3(t,x_1)}{\partial x_1} = -J_2(t,x_1) + \frac{1}{L_1} \int _0^{L_1} J_2(t,y_1) \, \text {d} y_1\\&\frac{\partial B_3(t,x_1)}{\partial t} + \frac{\partial E_2(t,x_1)}{\partial x_1} = 0. \end{aligned} \right. \end{aligned}$$
(108)

In some cases this model will be further reduced to 1d1v phase space by skipping \(v_2\), \(E_2\) and \(B_3\), so that the equation for \(E_1\) above remains as the only field equation.

As a first test case, we consider the Weibel instability in 1d2v phase-space as studied in [25] with an initial value of

$$\begin{aligned} f(t=0,x_1,v_1,v_2)&= \frac{1}{2\pi v_{th,1} v_{th,2}} \exp \left( - \frac{1}{2}\left( \frac{v_1^2}{v_{th,1}^2} + \frac{v_2^2}{v_{th,2}^2} \right) \right) , \quad x_1 \in [0,2\pi /\mathsf{k}),\\ B_3(t=0,x_1)&= \beta \cos (\mathsf{k}x_1),\\ E_2(t=0,x_1)&= 0, \end{aligned}$$

and \(E_1(t=0,x_1)\) is computed from Poisson’s equation. The parameters are set to \(v_{th,1} = \frac{0.02}{\sqrt{2}}\), \(v_{th,2} = \sqrt{12}v_{th,1}\), \(\mathsf{k}=1.25\), \(\beta = 10^{-4}\). As a reference solution, we use a simulation with a Fourier solver with \(K = 30\) modes corresponding to \(M = 61\) cells (i.e., grid points), and \(N = 10^5\) particles with a piecewise affine spline shape function S.

As a second test case, we consider the two-stream instability in 1d1v phase-space with initial value

$$\begin{aligned} f(t=0,x_1,v_1) = (1+ \epsilon \cos (\mathsf{k}x_1)) \frac{1}{2\sqrt{2\pi }} \left( \exp \left( -\frac{(v_1+2.4)^2}{2}\right) -\exp \left( -\frac{(v_1-2.4)^2}{2}\right) \right) \end{aligned}$$

with parameters \(\epsilon = 0.001\) and \(\mathsf{k}= 0.2\). The initial field \(E_1\) is again determined from Gauss’ law. For this test case, the reference solution is also produced with a Fourier solver and a piecewise affine spline as shape function, but the grid resolution is reduced to 31 cells (and 15 modes) while the particle number is increased to \(5 \cdot 10^{6}\). Note that this test case requires a lot more particles to produce qualitative results compared to the Weibel test case.

In Secs. 7.2 to 7.4 below we study the influence of different numerical parameters using the relevant energy curves for these two test cases, namely the magnetic and electric energy, plotted in Figs. 1 and 2 respectively. In Sect. 7.5 we finally compare the long-time conservation properties of the schemes, looking at different error curves shown in Fig. 3.

7.2 Influence of the Shape Function

We first study the influence of the shape function. Two counteracting effects are expected: On the one hand, a higher degree of the shape function yields smoother data for the field solver and smoother trajectories, which should lead to higher accuracy. On the other hand, higher order smoothing kernels act as low-pass filters in Fourier space which may lead to spurious damping, as analyzed in [27] and numerically observed e.g. in [1, 11]. This latter effect is clearly seen in the simulations with \(M=7\) cells (grid points) of Figs. 1a and 2a. For this coarse resolution, low order splines give rather good results whereas higher order shapes lead to a visible damping in the instability growth rate for both test cases. Increasing the number of cells to \(M=15\) while keeping the number of particles constant as in Figs. 1b and 2b , we observe both effects: In this case, the degree one spline yields too noisy data for the field solver, while a degree of e.g. seven yields too high damping and an intermediate degree of four yields rather accurate results. Our results also show that when increasing the number of particles, the choice of the shape function is of lesser importance (cf. Figs. 1d and 2d).

7.3 Influence of the Space Semi-discretization

In Figs. 1c, d and 2c, d we next compare the variational scheme presented in Sect. 2 with the momentum-preserving variant from Sect. 3. Here we use the spectral finite element solver and a Hamiltonian splitting time discretization. With this configuration, the momentum-preserving scheme yields clearly worse results for the coarse resolution runs (in Figs. 1c and 2c), as the instability growth rate is damped similarly as with higher order shape functions. With increased resolution (i.e., using twice as many cells and four times as many particles for both test cases), we find that both schemes yield rather good results for various orders of the shape function (in Figs. 1d and 2d). Finally, we see in Fig. 1a that the long-time accuracy of the variational semi-discretization can be significantly better than that of the momentum-preserving one: here the Weibel instability is run with a small number of particles and we find a qualitatively wrong behavior for the momentum-preserving scheme using a piecewise affine shape function, where other schemes perform correctly. In Fig. 2f a similar comparison is done with the two-stream instability, using a higher particle resolution as required for this test case to produce qualitatively correct results. The long-time behavior is then found to be qualitatively good for the different schemes and shapes.

7.4 Influence of the Finite Element Solver

In Figs. 1e and 2e we then compare the different field solvers, namely the spectral solver and finite element solvers based on splines of degree one to three. Using a piecewise affine spline for the shape function and low resolution runs we find that the accuracy of the low order fem solver is of bad quality and it improves for higher orders and for the spectral solver. This observation holds for the two test cases.

7.5 Conservation Properties

The conservation properties of the various methods are compared in Fig. 3. For this we consider long time simulations with both the variational and the momentum-preserving space discretizations. For the time stepping, we consider in both cases a Hamiltonian splitting as before but we also provide the solution with an energy-conserving discrete gradient propagator for the variational scheme to show that the semi-discretization is indeed energy-conserving. Figure 3a and b show the relative error in energy conservation for the various runs. We can see that the energy is conserved up to the tolerance of the linear solvers for the variational scheme with an energy-conserving discrete gradient time propagator. If we use the Hamiltonian splitting instead, there is an energy error but its behavior is oscillatory and decreases with decreased time step. This is the typical behavior for such Poisson integrators. Finally, we see that the energy error is larger for the momentum-preserving scheme, in particular for the low order shape function with a low particle resolution. For the variational scheme, on the other hand, the energy error does not depend on the shape function.

Figure 3c and d show the error in momentum for the various methods. We can see that the momentum-preserving scheme indeed preserves momentum up to machine precision. On the other hand, for the variational scheme the error in momentum increases as soon as the nonlinear phase of the simulations starts and later flattens out at a certain level. As this error level seems to be rather independent of the propagator, and is smaller for higher order shape functions, we conjecture that it is dominated by the error in the spatial semi-discretization.

Finally the error in Gauss’ law as a function of time is shown in Fig. 3e and f for the two test cases, respectively. We can see that all scheme preserve Gauss’ law to machine precision.

Fig. 1
figure 1

Weibel instability: Time evolution of the magnetic energy for various configurations. In all figures except (e), a spectral finite element solver is used and the degree of the shape function is given in the legend. In (e), the shape function is a spline of degree 1 and the legend indicates the degree of the finite element solver. The number of particles is 1000 in all figures except (d) where it is 4000. Figures a, b, and e show results with the variational scheme and figures c, d, and f compare the variational and the momentum-preserving schemes (see legend). All simulations use the Hamiltonian splitting time propagator

Fig. 2
figure 2

Two-stream instability: Time evolution of the first component of the electric energy for various configurations. In all figures except (e), a spectral finite element solver is used and the degree of the spline shape is given in the legend. In (e), the shape function is a spline of degree 1 and the legend indicates the degree of the finite element solver. The number of particles is 48,000 in all figures except (d) where it is 192000. Figures a, b, and e show results with the variational scheme and figures c, d, and f compare the variational and the momentum-preserving schemes (see legend). All simulations use the Hamiltonian splitting time propagator

Fig. 3
figure 3

Conservation properties: energy, momentum and Gauss’ law errors are shown for long-time simulations of the Weibel instability with \(N=1000\) particles (left column) and of the two-stream instability with \(N = 48000\) particles (right column). Two different time-schemes are used with the variational space-discretization (37)–(38), whereas the momentum-preserving variant (51)–(52) is advanced only with the Hamiltonian splitting scheme described in Sect. 4.4. In all the runs, a spectral solver with \(K=7\) modes is used for the field

8 Conclusion and Outlook

In this article we have presented a general framework for variational particle discretizations of the Vlasov-Maxwell equations, where the discrete fields and potentials belong to an abstract de Rham sequence. Under the main assumption that the particle-field interactions can be represented by approximation operators which commute with the sequence, we have shown that a Discrete Action Principle yields a system of time-continuous equations which are gauge-free, variational by construction and Hamiltonian in the sense that they admit a discrete Poisson bracket. The resulting system then preserves the total energy as well as the variational discrete Gauss laws and the other Casimirs of the discrete bracket. Within the same framework we have also proposed a variant which preserves the total momentum and the discrete Gauss laws.

We have then illustrated our construction by describing two new applications on spline and spectral discretizations, with particle-field coupling techniques based on interpolation and histopolation operators, and averaged interior products for the momentum-preserving alternative discretizations. Finally we have verified the conservation properties of these discretizations at the numerical level, when combined with different time integrators such as an explicit Hamiltonian splitting or a discrete gradient scheme.

Typical fields of application for such schemes include problems with very long simulation times as is typical in magnetic confinement fusion, for which very good energy conservation is needed, as well as shorter problems such as in inertial confinement fusion, where the preservation of momentum is generally preferred for the accurate description of fast transient regimes. The strength of our approach then lies in the fact that it can be applied to several existing families of compatible finite elements on general meshes, as well as to mapped domains with curvilinear coordinates. Future directions of research will consist in studying particular implementation of these schemes in complex geometries that are relevant to fusion problems, and in extending this approach to more complex models such as drift and gyrokinetic equations, or hybrid fluid-kinetic systems.