-
Notifications
You must be signed in to change notification settings - Fork 594
Leverage particle.move_distance in event advance #3544
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
Conversation
pshriwise
left a comment
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.
Thanks for another improvement @GuySten! Just one tiny question.
| std::min({boundary().distance(), collision_distance(), distance_cutoff}); | ||
|
|
||
| // Advance particle in space and time | ||
| // Short-term solution until the surface source is revised and we can use |
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.
To close the loop here, do we know if there is an issue or PR related to this comment we can cite in this PR that resolved the surface source problem?
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 comment was added in #2631. You can read the discussion there but it was not clear to me what the problem was or why now it's working.
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.
Me either, but the behavior should be equivalent so I won't let it hold up this PR.
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.
Maybe the intent was to include time updates inside move_distance. @cfichtlscherer, can you provide some extra info here?
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.
Sorry, can't remember why we had it in a loop, but looks good for me.
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.
There was a surface source test that was failing when the change to use move_distance was made. It was unclear at the time why -- probably some weirdness with how the compiler was optimizing code resulting in slightly different numeric results. Whatever the reason was, there have evidently been enough changes (compilers, tests, implementation, underlying libraries) that it is no longer affected as evidenced by the tests on this PR passing.
Here was my original comment about it:
#2454 (comment)
Description
This PR simplifiy event advance by using particle.move_distance.
Checklist
I have followed the style guidelines for Python source files (if applicable)I have made corresponding changes to the documentation (if applicable)I have added tests that prove my fix is effective or that my feature works (if applicable)