-
Notifications
You must be signed in to change notification settings - Fork 156
Fix division by zero in mpcd collision #2228
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: trunk
Are you sure you want to change the base?
Conversation
Co-authored-by: Michael Howard <[email protected]>
Co-authored-by: Michael Howard <[email protected]>
mphoward
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.
Looks good to me! Please add the small comment to the unit test, then this is good to go from my side. You will also need to add a changelog entry documenting the bugfix.
Co-authored-by: Michael Howard <[email protected]>
|
There seems to be an issue with the MPI unit tests. Please run locally and debug. You also still need to add a changelog entry. |
mphoward
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.
Looks good to me, thanks!
Description
In the thermalize rigid body particles step, there is a potential division by zero if a rigid body has particles that have zero mass.
Motivation and context
This allows for rigid bodies to have constituent particles that do not participate in the MPCD collision step and have zero mass.
Resolves #2223
How has this been tested?
A pytest has been added to check for this error to future proof the code.
Checklist:
sphinx-doc/credits.rst) in the pull request source branch.CHANGELOG.rstfollowing the established format.