# Optimized Computation of Tight Focusing of Short Pulses Using Mapping to Periodic Space
## 3 Results and Discussion  
### Verification and Accuracy Determination  
The mapping described in Section 2.3 allows us to reduce the time and memory costs significantly. However, the question arises as to how accurate the computational results are. As compared to the direct computation, the only possible inaccuracy is the one caused by the overlap of the pulse in the periodic space. The accuracy therefore can be controlled by the ratio \(D/L\), which defines the relative size of margins used for avoiding overlaps. For a given required accuracy, the acceptable value of \(D/L\) depends on the problem parameters, primarily on the f-number and on the sharpness of the fringes mentioned above. To provide a general idea about the achievable accuracy and the corresponding values of \(D/L\), we compare the results of the described method to the results obtained via direct computation. In order to verify and examine the capabilities of the method in the most extreme conditions we take the field configuration described in Section 2.2 and consider a large value of the opening angle \(\theta=1\) (f-number \(\approx 0.3\)) and short pulse duration \(L=2\lambda\). We take the edge smoothing angle \(\varepsilon=0.1\). We assume that the pulse is focused along the \(x\)-axis and is initially located within the spherical layer in the region \(x<0\) at a sufficiently large distance \(R_{0}=16\lambda\) from the origin. For this case the direct computation can be performed in the region \(x,y,z\in[-20\lambda,20\lambda]\). The proposed method can be applied using the region with reduced size \(D\) along the \(x\)-axis. Because of the large value of \(\theta\), the peak intensity is reached almost exactly at the geometrical focus, i.e., at time \(t=R_{0}/c\) since the start of the simulation. Due to the properties of the spectral solver (Section 2.1), we can do only one iteration of the method with a time step of \(\Delta t=R_{0}/c\) to obtain the electromagnetic field at the instant of focusing. For the simulation, a computational grid with the resolution of 48 points per wavelength along \(x\)-axis and 1536 \(\times\) 1536 points along \(y\)- and \(z\)-axis (\(y,z\in[-20\lambda,20\lambda]\)) was used. The error was calculated as the maximal difference of the field measured between the cases of direct computation and the computation with the considered method. The computations for \(D=7\lambda=3.5L\) show that the error introduced by the presented method is 0.12% relative to the peak amplitude obtained in the direct computation. The time required for the computation is reduced by a factor of almost 6. The memory costs for the presented method were 55 GB RAM, instead of 300 GB RAM required for the direct computation. The dependence of the relative error on \(D\) for a grid with the resolution of 12 points per wavelength along \(x\) axis is shown in Figure 4a. As one can see, even at \(D_{min}/L\approx 1.9\) the error does not exceed 0.9%, and it quickly falls below 0.1% at \(D/L\approx 3.5\). Figure 2 shows that the small error values at \(D/L>3.5\) can be attributed to the diffraction of the fringes that do not focus with the remainder of the pulse. All of the results in this and further sections were obtained with the open source Hi-Chi framework [45]. The computation time of a typical simulation for different values of parameter \(D\) is presented in Figure 4b. The experiments were performed on the MVS-10P supercomputer at the Joint Supercomputing Center of the Russian Academy of Sciences. Each computational node of the supercomputer consists of \(2\times 18\)-core Intel Xeon Gold 6154 CPU (3.0 GHz) and 192 GB of RAM. The code was built with Intel C++ Compiler 17.0.4, and the high-performance multithreaded FFT implementation from the Intel Math Kernel Library 2017 (MKL) was employed. For double precision, we find that the computation time and memory cost per grid cell are 230 ns (in single-thread mode) and 48 bytes, respectively.