-
Notifications
You must be signed in to change notification settings - Fork 200
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 Python function to extract particles scraped during the last step. #5711
Add Python function to extract particles scraped during the last step. #5711
Conversation
ed5038e
to
136e774
Compare
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.
Thank you @RemiLehe for this PR!!!
I tested it and it works!
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 looks good, thanks!
A minor change would be to have the level default to 0 which is likely the most common case.
This adds a function that extracts the particles that were scraped at the current timestep.
This is useful in callback functions, where we often want to re-inject particles that hit the boundary, and therefore need to select the ones that were scraped at the current timestep.
This also avoids calling
clear_buffer
, which potentially interferes with theBoundaryScrapingDiagnostic