Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overload for getParticleCell that returns local cell index #4081

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

roelof-groenewald
Copy link
Contributor

@roelof-groenewald roelof-groenewald commented Aug 14, 2024

Summary

In WarpX we have a few routines that requires the local cell index of particles (i.e. the cell number in the current box). The AMReX function getParticleCell currently only has logic to return the global cell index (relative to the domain low end). This PR adds a new overload for that function which does not shift the cell index based on the global box index.

Additional background

See ECP-WarpX/WarpX#5118 for WarpX context.

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@atmyers
Copy link
Member

atmyers commented Aug 15, 2024

Hi @roelof-groenewald - thanks for this! Could you add short docstrings to these functions that explain the difference between them?

@atmyers atmyers enabled auto-merge (squash) August 16, 2024 23:06
@atmyers atmyers merged commit c061a14 into AMReX-Codes:development Aug 16, 2024
71 of 72 checks passed
@roelof-groenewald roelof-groenewald deleted the part_cell_overload branch August 16, 2024 23:50
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