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 special named flag for invalid particles #3688

Merged
merged 6 commits into from
Jan 12, 2024

Conversation

atmyers
Copy link
Member

@atmyers atmyers commented Jan 5, 2024

This lets you do

p.m_idcpu = LongParticleIDs::InvalidParticleID;

instead of

amrex::ParticleIDWrapper{p.m_idcpu} = -1;

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 atmyers requested a review from ax3l January 5, 2024 21:43
@ax3l ax3l self-assigned this Jan 5, 2024
@ax3l ax3l requested a review from AlexanderSinn January 9, 2024 01:04
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
@atmyers
Copy link
Member Author

atmyers commented Jan 11, 2024

Note that doing

p.m_idcpu *= -1;

is still okay, because if the original p.id() was positive, the new one will be negative, as long as the id is less than LongParticleIds::LastParticleID. Also, doing

p.m_idcpu *= -1;
p.m_idcpu *= -1;

will restore the original p.id() and p.cpu().

@atmyers atmyers merged commit 8692f60 into AMReX-Codes:development Jan 12, 2024
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants