  When a pulsed, few-cycle electromagnetic wave is focused by optics with
f-number smaller than two, the frequency components it contains are focused to
different regions of space, building up a complex electromagnetic field
structure. Accurate numerical computation of this structure is essential for
many applications such as the analysis, diagnostics, and control of
high-intensity laser-matter interactions. However, straightforward use of
finite-difference methods can impose unacceptably high demands on computational
resources, owing to the necessity of resolving far-field and near-field zones
at sufficiently high resolution to overcome numerical dispersion effects. Here,
we present a procedure for fast computation of tight focusing by mapping a
spherically curved far-field region to periodic space, where the field can be
advanced by a dispersion-free spectral solver. In many cases of interest, the
mapping reduces both run time and memory requirements by a factor of order 10,
making it possible to carry out simulations on a desktop machine or a single
node of a supercomputer. We provide an open-source C++ implementation with
Python bindings and demonstrate its use for a desktop machine, where the
routine provides the opportunity to use the resolution sufficient for handling
the pulses with spectra spanning over several octaves. The described approach
can facilitate the stability analysis of theoretical proposals, the studies
based on statistical inferences, as well as the overall development and
analysis of experiments with tightly-focused short laser pulses.
