# Enhancing Efficiency of Electromagnetic Simulation in Time Domain with Transformation Optics
## 5 Results from 1D and 2D Non-Uniform Grids and Their Efficiency
The \(n_{c}\), \(t_{s}\), and \(C\) for the uniform and non-uniform cases are listed in Table 2. The \(n_{c}\) is decided by the total number of cells. While the uniform cases shows the exponential growth of computational cost, the multiple-linear and linear-nonlinear cases only require 22.83% and 66.34% of the cost in the uniform 2.5-nm case. This confirms the efficiency of the non-uniform grid transformation. The non-uniform grids for the \(z\) direction is further implemented while the numerical cell size remains the same. At this time, the mapping functions \(x=f(u)\) and \(z=h(w)\) are demonstrated only for \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & \multicolumn{3}{c}{**Uniform Grids**} & \multicolumn{3}{c}{**1D Non-Uniform Grids**} & \multicolumn{3}{c}{**2D Non-Uniform Grids**} \\ \hline  & **10** & **5** & **2.5** & **Multiple-Linear** & **Linear-Nonlinear** & **Multiple-Linear** & **Multiple-Linear** \\  & **nm** & **nm** & **nm** & **(2.5 nm)** & **(2.5 nm)** & **(2.5 nm)** & **(0.625 nm)** \\ \hline \(n_{c}\) & 48 & 48 & 144 & 96 & 144 & 48 & 96 \\ \(t_{s}\) & 0.37 & 3.39 & 23.54 & 8.06 & 15.62 & 3.75 & 21.76 \\ C & 18 & 163 & 3390 & 774 & 2249 & 180 & 2089 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Number of parallel-computing cores \(n_{c}\), total hours of simulation \(t_{s}\), and computational cost \(C\) for the cases of uniform grids, 1D non-uniform grids, and 2D non-uniform grids. Figure 5: Mesh of the 1D non-uniform grids from (**a**) the multiple-linear mapping function and (**b**) the linear-nonlinear mapping function. The thick lines represent the boundaries of the aperture. the multiple-linear case. For both functions, \(m=4\), \(\Delta x_{1}\) and \(\Delta z_{1}\) varies from 0.625 nm to 10 nm, and \(\Delta x_{j}=\Delta z_{j}=2.5\times 2^{j-1}\) for \(j=2\), 3, and 4. The end points of the regions \(\{X_{1}\), \(X_{2}\), \(X_{3}\), \(X_{4}\}\) are as the same as that used in the previous demonstration while \(\{Z_{1}\), \(Z_{2}\), \(Z_{3}\), \(Z_{4}\}\) are 240 nm, 280 nm, 320 nm, and 4000, respectively. The spectrum yielded when \(\Delta x_{1}=\Delta z_{1}=2.5\) nm is shown in Figure 4; in this case, the stability factor is also \(S\cong 0.45\) due to the same stability requirement of the PEC-like material. The spectrum coincides with those from the cases of the 1D non-uniform grids. The \(\lambda_{p}\) and \(T(\lambda_{p})\) of the spectrum are listed in Table 1; we find that \(\lambda_{p}\) is identical to the 1D cases and \(T(\lambda_{p})\) has negligible difference. Since the cases of the 2D and 1D non-uniform grids have the same resolution in the central area, this is expected. However, in this 2D case, the computational cost is remarkably reduced to \(C=180\) while \(n_{c}=48\), as listed in Table 2. Therefore, with similar accuracy, the 2D transformation requires only 5.31% of the cost in the uniform 2.5-nm case. We show the spectrum yielded when \(\Delta x_{1}=\Delta z_{1}=0.625\) nm in Figure 4; in this case, the stability factor \(S=0.17\) due to the numerical stability requirement of the transformation medium. As seen, the spectrum moves toward that at convergence previously obtained based on the spectrums of the cases of the uniform grids. Because the case of the 2D non-uniform grids has the higher resolution in the central area, the yielded spectrum expectedly becomes closer to that at convergence. The \(\lambda_{p}\) and \(T(\lambda_{p})\) of the spectrum are listed in Table 1; we find that \(\lambda_{p}=642\) nm and \(T(\lambda_{p})=3.68\), similar to those of that at convergence, \(\lambda_{p}=632\) nm and \(T(\lambda_{p})=3.51\). The computational cost is \(C=2089\) while \(n_{c}=96\), as listed in Table 2. Although the number of time-steps increases (due to the lower \(S\)) in this case, we still obtain the less computational cost than that of the uniform 2.5-nm case.