=================

In this section we present numerical results to validate the proposed HDG formulations. All HDG methods have been implemented in Fortran 90. All our tests are performed on a Macbook with a 1.3 GHz Inter Core i5 CPU and 4 GB memory. We employ the multifrontal sparse direct solver MUMPS [@AmestoyEtal2000] to solve the discretized systems of linear equations.

In HDG methods, we calculate the total fields ${\mathbf{E}}^\text{tot}$ and $H^\text{tot}$. The scattered fields are then calculated by subtracting the incident field from the total fields. We use HDG-$\mathbb{P}_p$ to denote the HDG method with interpolation order $p$. Here we choose fixed values $\tau_{\lambda}= \tau_{\eta}=1$ for the stabilization parameters. Different choices are discussed in Ref. [@Gopalakrishnan2015].

Convergence study: Wave propagation in a cavity
-----------------------------------------------

While elsewhere in this article we focus on nanowire structures, here we first study the convergence of our method by considering wave propagation in a cavity. This cavity is assumed to be a square domain $\Omega_{\Box}=\{(x,y)\in[0,L]\times[0,L]\}$ with the PEC boundary condition and hard-wall condition $${\mathbf{n}}\times {\mathbf{E}}= 0, \text{ and } {\mathbf{n}}\cdot{\mathbf{J}}=0, \text { on } \partial\Omega_{\Box}.$$ This test case can be viewed as the frequency-domain version of the first test case in [@Schmittetal2016]. The simplicity is 