# Accelerating Electromagnetic Field Simulations Based on Memory-Optimized CPML-FDTD with OpenACC
## 4 Simulation Settings and Results
### Parabolic Plate Reflector  
In this experiment, the feed of the antenna will radiate electromagnetic waves that reach the parabolic antenna, distributing the electromagnetic field along the surface and reflecting the field towards the primary radiator (i.e., the focus of the parabola). The domains are of size 5 m \(\times\) 5 m, 10 m \(\times\) 10 m, and 20 m \(\times\) 20 m for 2.45 GHz, 5.00 GHz, and 20.00 GHz respectively. The parabolic plate is considered made of silver (\(\sigma=6.3\times 10^{7}\)). The electromagnetic field source is isotropic, spherically symmetric, and is placed within a hood feeder. Figure 13 shows the experimental setup, where the green marks depict the location of the control points used to check the quality of the solution. The behavior of the resultant field within the physical domain is expected, and demonstrates the adequate conversion from spherical to plane wavefronts. Moreover, the larger energy occurs over the parabola's focus, when the plane wavefront illuminates it. Table 9 shows the configuration of the numerical scenarios for the parabolic plate, and Table 10 the memory required. Computing times measured for the simulations of the parabolic reflector using one CPU are shown in Table 11. Table 12 shows the computing times obtained using the GPUs. Figures 14-16 depicts a bar graph comparing the times for the 2.45 GHz, 5.00 GHz and 20.00 GHz cases respectively. Speed-up factors are showed in Table 13.  
In Table 14 are shown the calculated MSE between the control point values of the CPU in double precision versus the fastest GPU execution in single precision. The simulations results for the parabolic plate are depicted in Figure 17. Figure 18, shows the absolute errors for the last snapshots of the simulations, the errors are around \(10^{-6}\sim 10^{-7}\). In this study, a memory saving design makes sense because the memory in the GPU is limited, and the instances GPU-MD (double) and GPU-VD (double) can not be performed due to the limitation of 12 GB memory in the RTX 3060 card. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Version** & **2.45 Ghz** & **5.00 Ghz** & **20.00 Ghz** \\ \hline CPU-MD (double) RTX 3060 & 1.00X & 1.00X & 1.00X \\ CPU-VD (double) RTX 3060 & 0.90X & 0.89X & 0.87X \\ GPU-MD (double) RTX 3060 & 4.58X & 4.29X & Out of Memory \\ GPU-VD (double) RTX 3060 & 2.23X & 2.11X & Out of memory \\ GPU-MS (single) RTX 3060 & 10.57X & 9.32X & 9.27X \\ GPU-VS (single) RTX 3060 & 3.89X & 2.96X & 2.68X \\ GPU-MD (double) Titan RTX & 5.77X & 5.63X & 5.62X \\ GPU-VD (double) Titan RTX & 2.24X & 2.10X & 7.09X \\ GPU-MS (single) Titan RTX & 12.00X & 6.97X & 7.14X \\ GPU-VS (single) & 4.35X & 2.77X & 5.46X \\ \hline \hline \end{tabular}
\end{table} 
Table 13: Speed-up factors calculated using as a base the utilized execution time by CPU-MD, for the parabolic propagation. Figure 14: Comparison between the execution times obtained for the parabolic propagation at 2.45 Ghz. Figure 16: Comparison between the execution times (\(\times 10^{2}\)) obtained for the parabolic propagation at 20.00 Ghz. Figure 17: The parabolic plate experiment’s electric field distribution \((E_{z})\) is depicted. Snapshots at 400 (**A**) and 750 (**B**), and 1160 (**C**) time steps are shown. The simulation lasted 1160 time steps, and the source was turned off at 580. Very similar results are obtained for the 5.00 GHz and 20 GHz frequencies.