-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix hvap and prevent undefined behavior from using unitialized variables #397
Conversation
It doesn't effect the code behavior, but "compressability" is spelled incorrectly and should be "compressibility". Can we get the variable name updated in the code? |
Done |
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.
I'm approving the Pull Request, but before merging you should fix the OOB memory access in OutputVars.cpp on line 21 when running GCMC. Instead of BOX_TOTAL in the for loop, we should be using BOXES_WITH_U_NB I would use the same on line 29, even though for GEMC they are equivalent.
The other CODACY comments are for the tests.
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
Density was being incorrectly determined for simulations with > 1 molecule kind.
VapBox and LiqBox was unitialized for simulations where kind 0 in box 0 was more populous than kind 0 in box 1.
Other variables were uninitialized.
This is a high priority bug because of the segfaults it may generate from using an uninitialized variable to index into memory
See attached Blk file showing HVAP is printed to Blk and Console.
Blk_Output_data_BOX_0.txt
Console.txt
Also, so integration testing scripts are added to the test/ directory.