-
Notifications
You must be signed in to change notification settings - Fork 37
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
Bugfix to particle defragmentation #1185
Conversation
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.
LGTM! The defrag in outputs happens even when particles aren't being dumped, which is also likely undesirable.
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.
Regarding defragging in output. We don't have to do this. I could make the output machinery not use it. But it was convenient.
PR Summary
There was a bug in the defragmentation routine acting on particle lists. The issue was that empty indices weren't being updated after defragmentation. This PR fixes that.
As an aside: this produced the surprising effect that simulation correctness depended on frequency of simulation output, even when no particle fields were being output. This is because particle defragmentation is called during every output cycle. Not saying we can't do this, just mentioning it because it was unexpected. Shouldn't be a correctness issue if defragmentation actually works :)
PR Checklist