## 3 Results and Discussion
### Performance of Parallel Cartesian Mesh Generation Algorithm
Through their mesh generator, a model with \(4.5\times 10^{4}\) facets was meshed into \(5.04\times 10^{8}\) mesh cells using \(4.02\times 10^{3}\) s. As can be seen in Table 1, the similar scale mesh generation can be completed within 10 s. Compared with their mesh generator, the advantages of the proposed algorithm are mainly embodied in the GPU parallel implementation and C++ implementation. Figure 10: A house model for performance test. To further analyze the time cost of each step in parallel algorithm, the running time percentage on GPU of each test is recorded in Figure 12. The running time on CPU and GPU are visualized for the four models, in which the green bars represent the running time on GPU and the red bars represent the running time on CPU. As can be seen, the average running time on GPU was 60% of the total running time. The running time on GPU contained ray generation, intersection calculation, and property mapping. The running time on CPU mainly contained data transmission between the host memory and the device memory, data preprocessing, and mesh merging. This result shows that the GPU took on a huge time-consuming computing task, but in order to know the details of program execution on the GPU clearly, some performance parameters needed to be measured, such as occupancy and floating-point operations per second (FLOPS). Occupancy is the ratio of active warps on a streaming multiprocessor (SM) to the maximum number of active warps supported by the SM in the GPU. In the above four tests, the occupancy is recorded in Figure 13. As can be seen, the average percentage of the activated warps to the total warps remained at a high level, which indicates that the parallel computing ability of GPU had been fully utilized. For the same model, such as model 4, \(10^{9}\), \(4.1\times 10^{9}\) and \(1.2\times 10^{10}\) mesh cells were generated through the proposed algorithm, respectively. The total time costs are shown in Figure 14. In Figure 14, the red line and symbols represent the total running time using the traditional sequential algorithm, and the blue line and symbols represent the total running time using the parallel algorithm. As can be seen, the total time cost was proportional to the number of mesh cells with the same model. The total time cost of three mesh generation was reduced by 15 times in average. With the increasing of mesh cell number, the parallel algorithm was more efficient than the sequential version with the same triangular facet number. Next, the influence of facets number on the mesh generation speed was researched. For the same model, the model was represented by different number of facets. The meshes with the \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Models** & **Model 1** & **Model 2** & **Model 3** & **Model 4** \\ \hline \multirow{4}{*}{\begin{tabular}{c} \begin{tabular}{c} Facet number \\ Mesh cells number \\ Mesh line generation \\ \end{tabular} } & \(1.9\times 10^{4}\) & \(1.3\times 10^{5}\) & \(4.5\times 10^{4}\) & \(9.5\times 10^{4}\) \\  & \(9.6\times 10^{9}\) & \(2.4\times 10^{11}\) & \(1.2\times 10^{9}\) & \(4.1\times 10^{9}\) \\ \end{tabular} \\  & Mesh line generation (s) & 0.36 & 7.90 & 0.21 & 0.26 \\ \multirow{2}{*}{\
\begin{tabular}{c} Traditional serial algorithm \\ GPU parallel algorithm \\ Speed-up ratio \\ \end{tabular} } & \(5.2\times 10^{2}\) & \(1.7\times 10^{4}\) & \(1.2\times 10^{2}\) & \(8.9\times 10^{2}\) \\  & Total time (s) & \(5.2\times 10^{2}\) & \(1.7\times 10^{4}\) & \(1.2\times 10^{2}\) & \(8.9\times 10^{2}\) \\ \multirow{2}{*}{
\begin{tabular}{c} GPU parallel algorithm \\ Speed-up ratio \\ \end{tabular} } & \(35.37\) & \(1.13\times 10^{3}\) & 8.45 & 61.23 \\  & 14.3 & 15.3 & 14.4 & 14.6 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Mesh generation time comparison between the sequential and parallel algorithm. Figure 11: A model containing 64 spheres for performance test. same number of cells were generated using the sequential and parallel algorithm.