Pxr laser antenna coupling
Guillaume Blaclard
Branch: berkeleylab/atap-warp:pxr_laser_antenna_coupling
Branch: berkeleylab/warp:master
Merged
Merged pull request
Merged in berkeleylab/atap-warp/pxr_laser_antenna_coupling (pull request #174)
Merged in berkeleylab/atap-warp/pxr_laser_antenna_coupling (pull request #174)
This pull request needs to be merged with the picsar PR #161.
It aims to use the laser antenna from picsar in the WARP+PXR mode. The changes are completely transparent for the user and we try to keep the file
em3dsolver.py
unchanged in a pure Warp utilisation.Before coupling, using WARP+PXR would have called the warp antenna defined by some arrays and not "true" particles. These arrays were given to the current and charge deposition routines to perform the laser injection. It was generally working good but there was no MPI exchange what so ever. It imposes that every process must have known the whole antenna arrays in a case of a moving window. This was potentially very memory expensive (in 3D, multiple 2D arrays with 1000s by 1000s points for each core!) and was prevented a good scaling on Mira in particular.
In PICSAR, the antenna particles are defined as new species, where the regular charge/current depositions are performed as well as the MPI/tile exchanges.
In order to prevent polluting the
em3dsolver.py
or thelaser/laser_antenna.py
files, we are overwriting the 3 class methods of LaserAntenna (initialize_virtual_particles
,push_virtual_particles
andselect_particles_in_local_box
) at the init of the EM3DPXR class. This method was already used to overwrite theget_quantity
routines of the Species class, when using picsar. In that way, the laser calls are performed at the same time in the step loop as warp alone.The details of the implementation are explained in the picsar pull request.