# Optimized Computation of Tight Focusing of Short Pulses Using Mapping to Periodic Space
Recently, the few-cycle laser technology has reached the state to produce higher energies much beyond the mJ level, which in combination with tight focusing provides strongly relativistic peak intensities [25] for various promising sources of isolated attosecond XUV pulses [23] and relativistic electron bunches [24]. However, this tight focusing is still very challenging [5, 28], especially with the almost octave spanning spectrum of few cycle laser pulses, and it will profit from further support by quick numerical algorithms. The numerical computation of electromagnetic field in the focal region for a given field in far-field zone can be performed via direct integration using the Green's function. In the most general case, when the phase and/or polarization properties vary across the transverse direction of the pulse to be focused, the computational costs are proportional to \(NM\), where \(N\) and \(M\) are the numbers of nodes of the grids that sample the field in the far- and near-field zones respectively. Note that the lowest spatial frequency components of the pulse determine the distance to and, thus, the size of the far-field zone, whereas the highest spatial frequency components determine the necessary resolution. This leads to an extensive growth of computational costs in the case of tight focusing (i.e., large diffraction angle) and short pulse duration, which is of interest in the context of the problems discussed above. The use of finite-difference time-domain (FDTD) methods for evolving the field from the far-field to the near-field zone leads to computational costs that are proportional to \(NT\)\(\sim\)\(N^{4/3}\), where \(T\)\(\sim\)\(N^{1/3}\) is the number of time steps to be performed. Such computations are subject to numerical dispersion, which cannot be removed along all the directions simultaneously and may affect significantly high-frequency components of the pulse [44]. Another attractive option is to use a spectral field solver, since it is free of numerical dispersion and it is possible to advance the field over large time intervals in a single step, leading to the numerical costs proportional to \(N\) In \(N\), assuming the use of a fast Fourier transform (FFT). In this case, however, the computations can still be hampered by the extensive size of the grid used for sampling the pulse in the far-field zone. The use of supercomputers, on the other hand, is complicated by the nonlocal data processing patterns required by the FFT routine. In this article, we present a computational scheme that makes use of the fact that a short pulse in the far-field zone is located within a thin spherical layer and thus occupies only a small fraction of the entire simulation domain. Taking advantage of the periodicity of spectral solvers, we map the far-field zone onto a smaller grid, achieving a significant reduction of computational costs. The implementation of the spectral solver and the proposed scheme was performed as part of the hi-\(\chi\) (Hi-Chi, High-Intensity Collisions and Interactions) project [45] (see also [46]). This open-source software package is a collection of Python-controlled tools for performing simulations and data analysis in the research area of strong-field particle and plasma physics. All the components are being developed in C++ and optimized for high performance CPUs, which allows for efficient performance of resource-intensive calculations. As part of the Hi-Chi project, we have implemented an easy-to-use and high-performance tool for modeling tightly focused radiation that can be used for computations on desktops (the supercomputer version is under development). In this work we validate the developed computational module and use it to characterize the properties of focused radiation, namely, the dependency of peak amplitude and the location of the attained peak on the \(f\)-number. The presented method and the developed routine can be of interest for both theoretical and experimental studies that involve tightly focused pulses, especially if the pulses have few-cycle durations.