-
Notifications
You must be signed in to change notification settings - Fork 29
[Draft] Reduce Particles: Speedup #1104
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
Draft
ax3l
wants to merge
3
commits into
BLAST-ImpactX:development
Choose a base branch
from
ax3l:topic-reduce-less
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduce methods to control which parameters (moments, min/max, covariances, etc.) to reduce in particle reduced beam characteristics/moments. Speed up usage, to avoid that recording the history of beam moments can dominate simple simulation runs.
5 tasks
5 tasks
WeiqunZhang
pushed a commit
to AMReX-Codes/amrex
that referenced
this pull request
Aug 19, 2025
## Summary In C++ it is not allowed to make a zero-sized array type like `int[0]` so a more verbose way using `amrex::TypeArray<int, 0>` needs to be used. Additionally, `std::declval` is now used instead of `Types{}`. ## Additional background Zero-variants in BLAST-ImpactX/impactx#1104 ## 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
Observed: - too explicit - split min/max out separately, seldomly needed - make the other options "stack"
WeiqunZhang
added a commit
to AMReX-Codes/amrex
that referenced
this pull request
Sep 11, 2025
## Summary Sometimes one needs the underlying (u)int value of an `enum class`, e.g., when building bitmasks. This adds a helper function to `AMREX_ENUM`. ## Additional background BLAST-ImpactX/impactx#1104 --------- Co-authored-by: Weiqun Zhang <[email protected]>
ax3l
commented
Sep 11, 2025
|
||
constexpr MomentSelection operator| (MomentSelection lhs, MomentSelection rhs) noexcept | ||
{ | ||
return static_cast<MomentSelection>(static_cast<std::underlying_type_t<MomentSelection>>(lhs) | static_cast<std::underlying_type_t<MomentSelection>>(rhs)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component: diagnostics
all types of outputs
help wanted
Extra attention is needed
Performance optimization
tracking: particles
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduce methods to control which parameters (moments, min/max, covariances, etc.) to reduce in particle reduced beam characteristics/moments. Speed up usage, to avoid that recording the history of beam moments can dominate simple simulation runs.
Fix #1102
To Do