diff options
author | 2021-08-30 16:26:55 -0400 | |
---|---|---|
committer | 2021-08-30 13:26:55 -0700 | |
commit | e130e57efcee4fb08cae9a5888c67c83db63abb4 (patch) | |
tree | 2e8cc1688c5842ba2d478c04887d8ba214bcd6f6 /Docs/source | |
parent | c17b786f935a52530e7d559b7bae4c6ab740ae85 (diff) | |
download | WarpX-e130e57efcee4fb08cae9a5888c67c83db63abb4.tar.gz WarpX-e130e57efcee4fb08cae9a5888c67c83db63abb4.tar.zst WarpX-e130e57efcee4fb08cae9a5888c67c83db63abb4.zip |
Make buffer of scraped particles available to Python code (#2164)
* Added wrapper to get number of particle species tracked by the scraper
Not sure if this is going to be useful, but it demonstrates a method to get information
from the ParticleBoundaryBuffer into Python.
* Stubbed out the main wrapper functions
* Added parameters to wrapper
* Added wrapper for getting the number of particles scraped of a species on a boundary
* added picmi arguments to scrape particles at the domain boundary
* Added wrapper to get the full particle buffer into python
* rearanged the getBuffer properties code a little
* Added docstrings +other suggested changes
* Added num_particles_impacted_boundary docstring
* fixed mistake in docstring
* Changed boundary parameter to be a string for clarity
* Fixed issue with the boundary parameter for scraping
* Fixed issue with the boundary input for scraping stats wrapper
* Added demonstration of particle scraping wrapper
* Added analysis.py file
* Fix typo in one of the dimension maps
Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com>
* Added before esolve to warpx evolve
* added test for the scraped particle buffer wrappers
* Moved python PICMI particle boundary scrape test
* Renamed test file to the correct name
* Removed old test
* added special functionality to get the timestep at which particles were scraped
* removed debug print
* added python wrapper for the clearParticles() function of the scraper buffer
* added special wrapper function to get the timesteps at which the particles in the boundary buffer were scraped
* updated test to match the non-PICMI test for the particle scraper buffer
* Fix uncaught rebase mistake
* re-activated picmi test of accessing the scraped particle buffers via python
* added documentation for the new parameters involved in the scraped particle buffer and fixed remaining issue with picmi test
* changes requested during code review
Co-authored-by: mkieburtz <michaelkieburtz@gmail.com>
Co-authored-by: Roelof <roelof.groenewald@modernelectron.com>
Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com>
Diffstat (limited to 'Docs/source')
-rw-r--r-- | Docs/source/usage/parameters.rst | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Docs/source/usage/parameters.rst b/Docs/source/usage/parameters.rst index b329928f6..8e5bc77de 100644 --- a/Docs/source/usage/parameters.rst +++ b/Docs/source/usage/parameters.rst @@ -759,6 +759,27 @@ Particle initialization If `1` is given, this species will not be pushed by any pusher during the simulation. +* ``<species>.save_particles_at_xlo/ylo/zlo``, ``<species>.save_particles_at_xhi/yhi/zhi`` and ``<species>.save_particles_at_eb`` (`0` or `1` optional, default `0`) + If `1` particles of this species will be copied to the scraped particle + buffer for the specified boundary if they leave the simulation domain in + the specified direction. **If USE_EB=TRUE** the ``save_particles_at_eb`` + flag can be set to `1` to also save particle data for the particles of this + species that impact the embedded boundary. + The scraped particle buffer can be used to track particle fluxes out of the + simulation but is currently only accessible via the Python interface. The + ``pywarpx._libwarpx`` function ``get_particle_boundary_buffer()`` can be + used to access the scraped particle buffer. An entry is included for every + particle in the buffer of the timestep at which the particle was scraped. + This can be accessed by passing the argument ``comp_name="step_scraped"`` to + the above mentioned function. + + .. note:: + Currently the scraped particle buffer relies on the user to access the + data in the buffer for processing and periodically clear the buffer. The + buffer will grow unbounded as particles are scraped and therefore could + lead to memory issues if not periodically cleared. To clear the buffer + call ``warpx_clearParticleBoundaryBuffer()``. + * ``<species>.do_back_transformed_diagnostics`` (`0` or `1` optional, default `1`) Only used when ``warpx.do_back_transformed_diagnostics=1``. When running in a boosted frame, whether or not to plot back-transformed diagnostics for |