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 function to get total weight of all particles in container #4795

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

roelof-groenewald
Copy link
Member

I need to get the weight of all particles in a given container periodically throughout a simulation. Instead of writing another reduction for it, I figured it makes sense to adapt the already existing sumParticleCharge function to one that returns the total weight. This also allowed reducing some code duplication in the ParticleNumber reduced diagnostic.

@roelof-groenewald roelof-groenewald added the cleaning Clean code, improve readability label Mar 20, 2024
@RemiLehe RemiLehe self-assigned this Mar 20, 2024
@RemiLehe RemiLehe self-requested a review March 20, 2024 21:25
@RemiLehe RemiLehe merged commit 2b50441 into ECP-WarpX:development Mar 21, 2024
45 checks passed
@roelof-groenewald roelof-groenewald deleted the total_weight branch March 21, 2024 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleaning Clean code, improve readability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants