-
Notifications
You must be signed in to change notification settings - Fork 202
Remove buggy synchronization at end of steps #5820
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
base: development
Are you sure you want to change the base?
Remove buggy synchronization at end of steps #5820
Conversation
@dpgrote Thanks for this PR! Would you be able to merge |
*m_fields.get(FieldType::Bfield_aux, Direction{1}, lev), | ||
*m_fields.get(FieldType::Bfield_aux, Direction{2}, lev) | ||
); | ||
if (!is_synchronized) { |
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.
This may be one of those examples where making it clear that is_synchronized
is a member variable of the WarpX
class, through the prefix m_
, would help not get lost while reading the code. For a minute I was trying to understand where is_synchronized
is defined in this function. We could rename it according to the WarpX style rules in a separate PR.
Two big PRs are being merged as we speak:
Since those PRs introduce new CI tests, I would recommend that we merge |
I could use this fix after #3630 was merged. |
This PR does cleanup, removing a potential bug that happens when the velocity is synchronized with position in the final diagnostic. The particle boundary conditions had not been applied so the field gather could be out of bounds.
Further cleanup is done, renaming Synchronize to SynchronizeVelocityWithPosition, and having it check is_synchronized, since the synchronization may have already been done.