-
Notifications
You must be signed in to change notification settings - Fork 15
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 true vacuum at high temperature #161
base: develop
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2401,6 +2401,12 @@ | |
PhasesList[i].id = i; | ||
} | ||
|
||
// impose that true vacuum at T = Tthigh has id = 0. | ||
for (auto &phase : PhasesList) | ||
if ((phase.T_high == T_high) and | ||
(phase.Get(T_high).potential < PhasesList[0].Get(T_high).potential)) | ||
std::swap(PhasesList[0], phase); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you sure this works? You are swapping an iterator with a reference here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or maybe easier: |
||
|
||
// identify coexisiting phase regions | ||
setCoexRegion(UseMultiStepPTMode); // can flip status_vacuum to error code | ||
|
||
|
Check notice
Code scanning / CodeQL
Equality test on floating-point values Note