Skip to content

Conversation

@AlexanderSinn
Copy link
Member

The most significant change this PR makes is that it switches the order in which particles are initialized from (uix * ny + uiy) * nz + uiz to (uiz * ny + uiy) * nx + uix. The new way has uix as the fastest-moving dimension, which is significantly faster in particle-grid operations, especially if num_ppc is 1.

The calculation of cellid is then further simplified by using Array4 and removing the index clamping, which is not necessary as the ParallelFor iterates over the same box.

Gpu::exclusive_scan is replaced by Scan::ExclusiveSum so that the return value can be used for num_to_add.

DefineAndReturnParticleTile is used to be more concise and make sure that the tile is defined.

ParticleTileData is used instead of realarray.

@atmyers atmyers merged commit 72c44ec into AMReX-Codes:main Nov 6, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants