Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Docs/sphinx_documentation/source/Particle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,18 @@ particles, if the processes generate particles they don't own (for example, if
the particle positions are perturbed from the cell centers and thus end up
outside their parent grid).

.. note::

The above code snippet, which successively calls :cpp:`push_back` on the particle
vectors, assumes you have compiled AMReX for CPU execution.
For GPU codes, one can either generate particles on the host and copy them
to the device, or generate the particles directly on the GPU. For the first
approach, please see the sample code `here <https://github.com/AMReX-Codes/amrex/blob/development/Tests/Particles/Redistribute/main.cpp#L81>`__.
For an example of generating a variable number of particles in each cell
directly on the GPU, please see
`this <https://github.com/AMReX-Codes/amrex-tutorials/blob/main/ExampleCodes/Particles/ElectromagneticPIC/Source/EMParticleContainerInit.cpp#L48>`__
Electromagnetic Particle-in-Cell tutorial

.. _sec:Particles:Runtime:

Adding particle components at runtime
Expand Down
Loading