## 4 Simulation Results and Analysis
### Antenna Simulation  
The radiation direction of an inverted-F antenna is simulated to illustrate the accuracy and efficiency of the scheme. The inverted-F antenna is etched onto a 40 mm \(\times\) 40 mm substrate with a relative permittivity of 2.2 and a thickness of 0.787 mm. The antenna design size is shown in Figure 9. At the antenna port, a voltage source is used for excitation. The internal resistance of the voltage source is 50 \(\Omega\) and the voltage is 1 V. The far-field radiation pattern of the antenna at a 2.4 GHz operating frequency is calculated using HFSS 2022 R1 and GPU-based FDTD parallel algorithms. The grid discrete size of the FDTD algorithm is \(\Delta x=0.133\) mm, \(\Delta y=0.133\) mm, \(\Delta z=0.262\) mm, and the calculation results are shown in Figure 10. It can be seen that the calculation results of the FDTD parallel algorithm based on a GPU and HFSS are in good agreement, which proves the calculation accuracy of the proposed parallel algorithm. Table 2 shows the calculation time, speedup, and parallel efficiency under the conditions of a CPU, a single GPU, dual GPUs at a dual node, and four GPUs at a dual node to verify the validity of the GPU-based FDTD method. In this example, a single GPU can obtain about 16 times the speedup compared with the CPU. Also, with the increase in the GPU number, the computational efficiency gradually decreases, which is caused by the increased communication time. The NCCL technology presented in this article can significantly reduce the communication time and improve the computational efficiency.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Hardware**} & \multirow{2}{*}{**CPU**} & \multirow{2}{*}{**Single GPU**} & \multicolumn{2}{c}{**Dual GPUs at Dual Node**} & \multicolumn{2}{c}{**Four GPUs at Dual Node**} \\ \cline{5-6}  & & & **Without NCCL** & **With NCCL** & **Without NCCL** & **With NCCL** \\ \hline Time (s) & 18,792 & 2380 & 1275 & 1211 & 658 & 604 \\ Speedup & 1 & 7.9 & 14.9 & 15.5 & 28.6 & 31.1 \\ Efficiency & \(\backslash\) & 100.0\% & 94.3\% & 98.1\% & 90.5\% & 98.4\% \\ \hline \hline \end{tabular}
\end{table}
Table 1: Calculation time, speedup, and efficiency under different hardware conditions of example 4.1.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Hardware**} & \multirow{2}{*}{**CPU**} & \multirow{2}{*}{**Single GPU**} & \multicolumn{2}{c}{**Dual GPUs at Dual Node**} & \multicolumn{2}{c}{**Four GPUs at Dual Node**} \\ \cline{5-6}  & & & **Without NCCL** & **With NCCL** & **Without NCCL** & **With NCCL** \\ \hline Time (s) & 20,792 & 1308 & 680 & 658 & 351 & 332 \\ Speedup & 1 & 15.9 & 30.6 & 31.6 & 59.2 & 62.6 \\ Efficiency & \(\backslash\) & 100.0\% & 96.2\% & 99.4\% & 93.1\% & 98.4\% \\ \hline \hline \end{tabular}
\end{table}
Table 2: Calculation time, speedup, and efficiency under different hardware conditions of example 4.2.  
Figure 9: Structural dimensions of inverted-F antenna.  
Figure 10: Antenna far-field radiation direction diagram: (**a**) \(\varphi=0^{\lx@math@degree}\), (**b**) \(\varphi=90^{\lx@math@degree}\), and (**c**) \(\theta=90^{\lx@math@degree}\).