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

[WIP] Particle Names from AMReX #805

Draft
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Jan 18, 2025

Use the new AMReX named SoA component feature to replace our self-made naming bookkeeping logic.

Depends on

Use the new AMReX named SoA component feature to replace our
self-made naming bookkeeping logic.
@ax3l ax3l added the component: core Core ImpactX functionality label Jan 18, 2025
atmyers pushed a commit to AMReX-Codes/amrex that referenced this pull request Jan 21, 2025
## Summary

If the same particle container type is used to create multiple particle
species, then the compile-time defined names were only added for the
first particle species (instance) of the type and then skipped for any
later species (another instance of the same type).

This is due to the global variable (so many globals...) used in the type
init. This fixes the problem by moving the instance related name logic
out of the once-per-type logic `if` branch.

## Additional background

First seen with ImpactX for its "lost" particle species (2nd instance of
the same PC type in the code).
Needed for ECP-WarpX/impactx#805

## Checklist

The proposed changes:
- [x] 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
ax3l added a commit to AMReX-Codes/amrex that referenced this pull request Jan 21, 2025
## Summary

Add name to index getters and query (has) functions to SoA names. Ported
over from ImpactX.

- [x] Rebase after #4299 was merged

## Additional background

ECP-WarpX/impactx#805

## Checklist

The proposed changes:
- [ ] fix a bug or incorrect behavior in AMReX
- [x] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: core Core ImpactX functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant