## 2 Methods
### Variational Formulation  
We assume that the domain \(\Omega\) of the electromagnetic problem to be solved is a smooth domain for which we have the following boundary value problem:  
\[\mathbf{\
abla}\times(\mu_{r}^{-1}\mathbf{\
abla}\times\mathbf{E})-k_{0}^{2} \epsilon_{r}\mathbf{E} =\mathbf{F} \text{in }\Omega, \tag{1}\] \[\mathbf{\hat{n}}\times(\mathbf{E}\times\mathbf{\hat{n}}) =\mathbf{\
abla}_{\text{D}} \text{on }\Gamma_{\text{D}},\] (2) \[\mathbf{\hat{n}}\times(\mu_{r}^{-1}\mathbf{\
abla}\times\mathbf{E}) =\mathbf{\
abla}_{\text{N}} \text{on }\Gamma_{\text{N}},\] (3) \[\mathbf{\hat{n}}\times(\mu_{r}^{-1}\mathbf{\
abla}\times\mathbf{E})-jk_{0} \mathbf{\hat{n}}\times(\mathbf{E}\times\mathbf{\hat{n}}) =\mathbf{\
abla}_{\text{C}} \text{on }\Gamma_{\text{C}}, \tag{4}\]  
taking the electric field \(\mathbf{E}\) as the field to approximate. We decompose the boundary of the domain \(\partial\Omega\) into the sets \(\Gamma_{\text{D}}\), \(\Gamma_{\text{N}}\), and \(\Gamma_{\text{C}}\), corresponding to Dirichlet, Neumann, and Cauchy boundary conditions, respectively. We set \(k_{0}\), \(\epsilon_{r}\), and \(\mu_{r}\) as the vacuum wavenumber,relative electric permittivity, and relative magnetic permeability, respectively. The vector \(\mathbf{\hat{n}}\) is the outward unit normal vector regarding \(\Omega\). We assume isotropic and homogeneous materials without loss of generality. The terms \(\mathbf{F}\), \(\mathbf{\
abla}_{\text{D}}\), \(\mathbf{\
abla}_{\text{N}}\), and \(\mathbf{\
abla}_{\text{C}}\) are used for the volumetric excitation and non-homogeneous boundary conditions. If we are not using MMS, \(\mathbf{F}\), \(\mathbf{\
abla}_{\text{D}}\), and \(\mathbf{\
abla}_{\text{N}}\) are set to \(\mathbf{0}\). We use the space of functions [1],  
\[\mathbf{H}(\text{curl},\Omega):=\Big{\{}\mathbf{w}\in[L_{2}(\Omega)]^{3}\Big{|}\mathbf{ \
abla}\times\mathbf{w}\in[L_{2}(\Omega)]^{3}\Big{\}}\,, \tag{5}\]  
to approximate the electric field due to its nature. The space \(L_{2}(\Omega)\) is the space of square-integrable functions over \(\Omega\). We also use the subspace \(\mathbf{H}_{0}(\text{curl},\Omega)\), whose functions enforce Dirichlet boundary conditions. We define the sesquilinear forms:  
\[\Big{(}\mathbf{w},\mathbf{v}\Big{)}_{\Omega} =\int_{\Omega}\mathbf{w}^{*}\cdot\mathbf{v}d\Omega, \tag{6a}\] \[\Big{\langle}\mathbf{w},\mathbf{v}\Big{\rangle}_{\Gamma} =\int_{\Gamma}\mathbf{w}^{*}\cdot\mathbf{v}d\Gamma, \tag{6b}\]  
using \({}^{*}\) to denote complex conjugation, \(\Omega\) as a given volume, and \(\Gamma\) as a specific surface. Applying the [PERSON] method yields:  
Find \(\mathbf{E}\in\mathbf{H}_{0}(\text{curl},\Omega)\) such that  
\[\Big{(}\mathbf{\
abla}\times\mathbf{w},\mu_{r}^{-1}\mathbf{\
abla}\times\mathbf{ E}\Big{)}_{\Omega}-k_{0}^{2}\Big{(}\mathbf{w},\varepsilon_{r}\mathbf{E}\Big{)}_{ \Omega}+jk_{0}\big{(}\mathbf{\hat{n}}\times\mathbf{w},\mathbf{\hat{n}}\times\mathbf{w}\Big{)} _{\Gamma_{\text{C}}}=\Big{(}\mathbf{w},\mathbf{F}\Big{)}_{\Omega}-\\ \Big{\langle}\mathbf{\hat{n}}\times(\mathbf{w}\times\mathbf{\hat{n}}),\mathbf{ \
abla}_{\text{N}}\Big{\rangle}_{\Gamma_{\text{N}}}-\Big{\langle}\mathbf{\hat{n}} \times(\mathbf{w}\times\mathbf{\hat{n}}),\mathbf{\
abla}_{\text{C}}\Big{\rangle}_{\Gamma_ {\text{C}}}\quad\forall\,\mathbf{w}\in\mathbf{H}_{0}(\text{curl},\Omega). \tag{7}\]  
The solution to this problem is obtained by solving the system of equations obtained after the discretization of the domain into second-order triangular prisms from [10]. Method of Manufactured Solutions  
The MMS consists of the manufacture of an analytical solution to a differential equation by solving the problem backward. If we take an equation \(\mathcal{D}(\mathbf{E})=\mathbf{f}\), assuming that \(\mathcal{D}\) is a differential operator and \(\mathbf{f}\) is a source term, the first step is to manufacture \(\mathbf{f}_{\text{MMS}}\) employing the introduction of an analytic solution \(\mathbf{E}_{\text{MMS}}\).