Particle-In-Cell Scalable Application Resource

Get the code


PICSAR has now been released open-source. To download the latest version of the code, you can clone directly the git repository on your computer by executing the following command in a terminal:

 git clone https://github.com/ECP-WarpX/picsar



PICSARlite is a subset of PICSAR that can be used for testing.

The PICSARlite version is built using a Python script (utils/generate_miniapp.py) that accepts a number of options:

  • --geom: Geometries to include [choices: ‘3d’ (default), ‘2d’, ‘all’].
  • --solver: Maxwell solver method(s) to include [choices: ‘fdtd’ (default), ‘spectral’, ‘all’].
  • --pusher: Particle pusher method(s) to include [choices: ‘Boris’ (default), ‘Vay’, ‘all’].
  • --depos: Type(s) of current deposition to include [choices: ‘direct’ (default), ‘Esirkepov’, ‘all’].
  • --charge: Whether to include charge deposition [choices: ‘off’ (default), ‘on’].
  • --order: Order of charge/current deposition to include [choices: ‘1’ (default), ‘2’, ‘3’, ‘n’, ‘all’].
  • --laser: Whether to include laser injection [choices: ‘off’ (default), ‘on’].
  • --optimization: Flag to include the optimized versions [choices: ‘off’ (default), ‘on’].
  • --diags: Whether to includes diagnostics [choices: ‘off’ (default), ‘on’].
  • --errchk: flag error, print warning messages at runtime when the code is trying to use unavailable routines. Note that this flag must be set to off when the flag –diags is set to off [choices: ‘2d’ (default), ‘3d’, ‘all’].

For example, to create a version with the default values, you may type :

python utils/generate_miniapp.py


python utils/generate_miniapp.py --geom 3d --solver fdtd --pusher boris --depos direct --charge off --order 1 --laser off --optimization off --diags off --errchk off

An example input script that runs with this particle configuration is given in:


that can be run with

mpirun -np 8 ../../fortran_bin/picsar homogeneous_plasma_lite.pixr

%d bloggers like this: