Maison de la Simulation has participated to the implementation of a particle merging process in the Particle-in-Cell (PIC) code Smilei. Smilei is an open-source and highly parallel code dedicated to laser-plasma simulation. It is developed by several labs (LLR, LULI) in France. It is nonetheless used in many other countries in Europe and in the World.

In PIC codes, dealing with macro-particles represents the major part of the code and is therefore the most time-consuming part in running simulations. Basically, more particles means slower computation although the correlation is not linear with vectorization. Consequently, most optimization strategies today focus on managing particles the most efficient as possible. Some simulation scenario induce particle growth such as laser interaction with ionization, magnetic shower or electron-positron pair cascading. These simulation cases reveal very difficult to simulate with long simulation times. In extreme cases, when the growth is exponential, the only possible solution is merging particles. This enables to maintain the number of particles at a reasonable level to achieve the simulation.

The method of M. Vranic *et al*. has been implemented with different optimization choices in all dimensions. It is schematically described in the figure above. Furthermore, an advanced documentation of the adapted algorithms is available on the official Smilei website. Nonetheless, this first implementation is still considered as a beta and constitutes the first step toward the comparison of different future methods. Moreover, it can induce numerical artifacts in the momentum distributions. The method should hence be used with caution.

The following video illustrates the use of the merging. This is the simulation of the collision of 2 counter-propagating extremely intense laser plane wave that induce a pair cascading phenomenon at the middle of the simulation from a seed.