## 1 Introduction  
The Finite Element Method (FEM) has been extensively used for Computational Electromagnetics [1] due to its robustness and versatility. However, it requires the use of volumetric meshes, which limit the size of the problems to be analyzed.  
To leverage this problem in FEM, some techniques have been proposed in the last years: Domain Decomposition Methods (DDM) [2, 3, 4] have increased the size of the problems that can be solved at the expense of a more difficult formulation and the use of iterative solvers; Model Order Reduction (MOR) techniques [5, 6] reduce the number of simulations required for a given bandwidth using polynomial interpolation techniques; multigrid methods [7, 8] are used as preconditioners for iterative solvers; and finally, substructuring methods that are purely algebraic approaches based on the Schur complement [9, 10].  
Our goal in this work is the analysis of finite periodic structures where a unit cell is repeated on space. Periodic structures are very common in microwave engineering, as frequency selective surfaces, phased array antennas, metamaterials, or electromagnetic bandgap structures [11, 12, 13, 14]. An approximated analysis of a finite periodic structure can be performed considering the structure to be infinitely periodic. Thus, the analysis is restricted to the analysis of the unit cell with periodic boundary conditions on the sides along with the directions on which there is periodicity, e.g., see [15, 16]. Although the infinitely periodic approximation is useful to model large structures, it neglects the border effects due to the finite size of the structures in practice. In this context, substructuring methods are useful as they provide an algebraically exact solution for the analysis of the finite periodic structure while alleviating the computational effort by working with a finite number of different Schur complements (being that number independent of the size of the structure). Specifically, we propose an approach in which there is only one type of Schurcomplement involved in the computations with the corresponding advantages in terms of computational resources.  
One of our contributions is to show the step-by-step development process we have followed in the introduction of this approach in an existing general-purpose FEM in-house code called HOFEM [17]. Specifically, we follow the Test-Driven Development (TDD) paradigm extensively used in other research fields as scientific computing and software engineering. We use unit and integration tests, system tests (using the Method of Manufactured Solutions--MMS [18; 19]), and application tests (smoke, performance, and validation tests). As a result, we managed to increase the reliability of the code and shorten its development cycle compared to other software development plans. This process can be also applied in different codes, e.g., [20; 21; 22; 23].  
The paper is structured as follows: In Section 2, we define the formulation used in the FEM code, the Schur complement-based substructuring methods that we use, and the types of validation procedures we have considered to introduce the technique; in Section 3, we show the unit and integration tests that we have considered, we use the MMS to show the accuracy of the implementation and to conduct error convergence tests, we define smoke tests and use a pyramidal horn antenna array as a real-world application, and we observe the performance of the introduced technique. Finally, in Section 4, we draw the conclusions we have obtained in this work.