(apr) bug fix#1
Open
chunliangmu wants to merge 2 commits into
Open
Conversation
Owner
|
Thanks @chunliangmu , I think you are correct that this is a bug. Did you run the test suite or check that it compiles with DEBUG=yes? |
Author
|
Hi @becnealon , I checked that it compiles with DEBUG=yes. On the other hand, when I run the test suite, it fails as it has a larger error on kinetic energy conservation when merging; but that is the same for the magic merging method before my change (for both before and after the bug fix) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Fix bug where the enclosed gas mass for sink particles may not be calculated correctly.
This bug is caused by the gas particles' apr mass are mistakenly inferred from sink particles' indexes
iinstead of gas particles' indexesj.The bug will affect calculations when using apr and sink particles has heating (e.g. when sink particles has non-zero luminosity).
Components modified:
Type of change:
Testing:
Did you run the bots? no
Did you update relevant documentation in the docs directory? no
Did you add comments such that the purpose of the code is understandable? no
Is there a unit test that could be added for this feature/bug? yes
If so, please describe what a unit test might check:
Check that running phantom on APR=yes with a sink particle with large radius and non zero luminosity that the enclosed mass is correct
Related issues: #