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

Dist None: Set to Zero #465

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Dist None: Set to Zero #465

merged 1 commit into from
Nov 15, 2023

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Nov 11, 2023

With GCC 12, compiling the None distribution throws warnings in compilation of add_particles. Originally, this was added so that the std::variant for impactx::distribution::KnownDistributions creates a default constructor for the variant.

Adding an assert that the distribution cannot be used in add_particles does not silence the warning diagnostics. Thus, we simply make it a distribution that sets the values to zero.

With GCC 12, compiling the `None` distribution throws warnings in
compilation of `add_particles`. Originally, this was added so that
the `std::variant` for `impactx::distribution::KnownDistributions`
creates a default constructor for the variant.

Adding an assert that the distribution cannot be used in
`add_particles` does not silence the warning diagnostics.
Thus, we simply make it a distribution that sets the values to
zero.
@ax3l ax3l merged commit c8a165a into ECP-WarpX:development Nov 15, 2023
13 checks passed
@ax3l ax3l deleted the warn-dist-none branch November 15, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants