Skip to content

Use RTSoA Particle Container#1234

Open
AlexanderSinn wants to merge 23 commits intoHi-PACE:developmentfrom
AlexanderSinn:Test_runtime_only_particle_container
Open

Use RTSoA Particle Container#1234
AlexanderSinn wants to merge 23 commits intoHi-PACE:developmentfrom
AlexanderSinn:Test_runtime_only_particle_container

Conversation

@AlexanderSinn
Copy link
Copy Markdown
Member

@AlexanderSinn AlexanderSinn commented Apr 22, 2025

This PR replaces the particle containers for both Beams and Plasmas with the new amrex::ParticleTileRT / amrex::ParticleContainerRTSoA. These only have runtime components, which will let us allocate particle components much more dynamically, just like the fields. 

Now that beam and plasma tiles have the same data type, this potentially allows reusing functions more easily between the two. 

The performance seems to be very similar to development, maybe <1% slower for some runs. Only the particle sorting/reordering is significantly slower because the vectors cannot be swapped anymore and need to be copied back.

  • Small enough (< few 100s of lines), otherwise it should probably be split into smaller PRs
  • Tested (describe the tests in the PR description)
  • Runs on GPU (basic: the code compiles and run well with the new module)
  • Contains an automated test (checksum and/or comparison with theory)
  • Documented: all elements (classes and their members, functions, namespaces, etc.) are documented
  • Constified (All that can be const is const)
  • Code is clean (no unwanted comments, )
  • Style and code conventions are respected at the bottom of https://github.com/Hi-PACE/hipace
  • Proper label and GitHub project, if applicable

@AlexanderSinn AlexanderSinn added the cleaning Code cleaning, avoid duplication, better naming, better style etc. label Apr 22, 2025
@AlexanderSinn AlexanderSinn changed the title Test runtime only particle container Use RTSoA Particle Container Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleaning Code cleaning, avoid duplication, better naming, better style etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant