**3. Computational nano-photonics: standard problems and numerical methods**

Nanophotonic structures are diverse, and their physical characteristics are related to one or more observables, that are required for their comprehension and design, including the distribution of an electric field inside a photonic cavity or a nanoparticle's scattering cross section. Depending on the extent of discretization, computational methodologies have been proposed to simulate the functional behavior of complex nanophotonics structures that do not have an analytical solution. This can be translated as approximating a physical problem with a set of appropriate analytical functions defined on a finite or infinite domain. Many common approaches that have been thoroughly studied in the context of computational electromagnetics [15, 16], with some of them have been quantitatively compared or validated to analytical or experimental findings in the field of nanophotonics [17–22]. However, finding functional cases that can equally compare the various numerical approaches remains a challenge. The methodology used to derive the approximated problem has a significant impact on the numerical method's strengths and disadvantages, including the kinds of challenges it is best suited for. Additionally, in comparison to calculating time and memory constraints, the performance of a numerical system requires a variety of other factors, including ease of execution, discretization complexity, and flexibility. Light propagation, localization, scattering, and multiscale problems are known as four types of problems that form the foundation for modeling nanophotonic systems and they can be handled with two categories of versatile approaches: integral (SIE, VIE) and differential (FE, FDTD, and hybrid FD/FE) methods. Time domain methods, like DGTD and FDTD, have now been described as being particularly suitable to light propagation problems, while the FE and SIE approaches are especially effective for problems involving light localization and finally, SIE and VIE based techniques, in addition of RCWA (unique to specific geometries), are well-suited to light scattering problems [23].

## **3.1 Finite differences in time domain (FDTD)**

Due to the ability to tackle a wide range of problems, FDTD approach is one of the most common methods in nanophotonics [24]. A staircase approximation is used in this technique to define the volumes of the nanostructure, superstrate, and substrate that have both space and time discretized, and finite difference quotients are used to replace both spatial and temporal derivatives of Maxwell's curl Equations [15, 25]. The famous algorithm proposed by Yee [26] is an example of FDTD method in addition to numerous other approaches [15, 24, 25].

#### **3.2 Finite elements (FE)**

The finite elements (FE) method is another widely used differential technique in nanophotonics for calculating an effective frequency-domain electromagnetic field. The finite elements in time-domain (FETD) approach and the Discontinuous Galerkin time-domain (DGTD) method are two hybrid strategies that rely on the inside of each element, the DGTD approach explicitly solves Maxwell's equations and connects them to a quantitative flux [27, 28]. In a similar way to FDTD, the central difference principle can be used to discretize in the time domain. This approach allows for the use of higher level expansion and checking functions, as well as the local solution of equations in every element, resulting in high accuracy

by combining high-order FE precision with a time-domain classification, allowing it to be used for large structures [29].
