## 2 Methods
### Schur-Based Substructuring Methods  
In this work, we address electromagnetic structures of the kind shown in Figure 1, where we have a two-dimensional finite grid of the so-called here unit cells. We want to have a full-wave, accurate solution of the problem taking into account the periodicity of the problem; thus, we use substructuring methods (i.e., the computation of the Schur complement) to solve the original system of equations using only a subset of the unknowns. In this way, we obtain a small, condensed matrix from the huge, sparse original matrix that, otherwise, we would need to solve if we would not apply substructuring techniques. Thus, let us divide the original set of unknowns from (12) into two disjoint sets, \(g_{1}\) and \(g_{2}\), leading to  
\[ \begin{split}&\mathbf{L}_{1,1}\cdot\mathbf{g}_{1}+\mathbf{L}_{1,2}\cdot\mathbf{g}_{ 2}=\mathbf{f}_{1},\\ &\mathbf{L}_{2,1}\cdot\mathbf{g}_{1}+\mathbf{L}_{2,2}\cdot\mathbf{g}_{2}=\mathbf{f}_ {2},\end{split}  \tag{13}\]  
where we apply a partial LU decomposition, here noted as \(\mathbf{L}=\mathbf{M}\mathbf{U}\),\[ \begin{pmatrix}\mathbf{L}_{1,1}&\mathbf{L}_{1,2}\\ \mathbf{L}_{2,1}&\mathbf{L}_{2,2}\end{pmatrix} = \begin{pmatrix}\mathbf{M}_{1,1}&\mathbf{0}\\ \mathbf{M}_{2,1}&\mathbf{I}\end{pmatrix}\begin{pmatrix}\mathbf{u}_{1,1}&\mathbf{u}_{1,2}\\ \mathbf{0}&\mathbf{S}\end{pmatrix} , \tag{14}\]  
that maps the original matrix to a condensed matrix as in Figure 2. We have used \(\mathbf{I}\) to denote the identity matrix, whereas the \(\mathbf{S}\) corresponds to the Schur complement of the original matrix \(\mathbf{L}\), i.e., \(\mathbf{S}=\mathbf{L}_{2,2}-\mathbf{L}_{2,1}L_{1,1}^{-1}\mathbf{L}_{1,2}\). We can observe that a sparse matrix is decomposed into the product of two block-triangular dense matrices: we work with the right lower dense block of the right matrix, \(\mathbf{S}\), which is expected to be much smaller than the original matrix. Specifically, we choose as \(\mathbf{g}_{2}\) the unknowns on the interfaces between unit cells. This is the best option to profit from the periodicity of the problem because it provides the minimal number of unknowns to solve the original problem. The original system may be solved in three steps:  
1. Solve \(\mathbf{M}_{1,1}\mathbf{y}_{1}=f_{1}\) and obtain \(\mathbf{y}_{2}\) from \(\mathbf{M}_{2,1}\mathbf{y}_{1}+\mathbf{I}\mathbf{y}_{2}=\mathbf{f}_{2}\). 2. Solve the condensed problem \(\mathbf{S}\mathbf{g}_{2}=\mathbf{y}_{2}\). 3. Expand the solution \(\mathbf{g}_{2}\) to the whole system with \(\mathbf{U}_{1,1}\mathbf{g}_{1}+\mathbf{U}_{1,2}\mathbf{g}_{2}=\mathbf{y}_{2}\). From a physical point of view, we construct the surface condensed problem; then, we solve this small problem and, after that, we propagate the solution from the surface to the interior of each unit cell. Figure 1: Regular periodic structures addressed in this work. Figure 2: Schur factorization of the left matrix, (**a**) into lower, (**b**) and upper, (**c**) block-triangular matrices. The main advantage of this method is that we can extend the dimension of the problems that can be solved in a given machine since the original big matrix is not even constructed. Additionally, the data FEM structures of the whole periodic problem are not built (e.g., those supporting the mesh of the whole problems) since we can operate only with the unit cell. As seen in (10), we use a discretization of finite elements to solve a problem with FEM. This leads to having a direct correspondence between the local (to each element) unknown and the global (in the final system of equations) unknown that identifies univocally that unknown in the whole problem. However, the introduction of a unit cell leads us to introduce an intermediate correspondence between the cell unknown and the global unknown. Finally, we extract the surface unknowns from the global set of unknowns. We use three algorithms as intermediate steps to achieve the final solution:  
1. Full mesh approach. 2. Nine Schur complement approach. 3. One Schur complement approach.