-
Notifications
You must be signed in to change notification settings - Fork 8
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
Guard against FPEs in the PTE solver #356
Conversation
All 54 tests pass in my local testing |
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 going through this @jhp-lanl ! This is a much-needed cleanup.
Does re-git pass? If so, I think this is good to go. |
@ktsai7 and I are working on the CI. I would say if this works for you, merge it into |
Sounds good. In that case, merge when ready @jhp-lanl |
@jhp-lanl what's the status on this? Is this ready for merge? |
Ah yes, I was waiting for Richard's CI merge and then dropped the ball. Let me resolve the conflicts and get it merged ASAP |
PR Summary
This PR mostly adds
robust::ratio
divides throughout the PTE solver. This was especially important for two scenarios:RhoPmin()
function of an EOS returns zero (which is the default)In connection with the internal energy, I also made sure that the energy scale,
uscale
is non-negative since it didn't seem to make sense to me for this to be a signed quantity. Please let me know if I'm wrong here, but it always appeared to be a positive scaling factor since it appeared that important signs would cancel in some circumstances (negative pressures for example).Some debug asserts were also added to codify the necessary conditions for the PTE solver to operate. For example, one could reasonably assume that the PTE solver is robust to zero volume or mass fractions, but that isn't actually the case.
Finally, with the huge help of @rbberger , I corrected a CMake bug where a statically-built Kokkos wouldn't properly link to the Fortran tests.
Fixes #354
PR Checklist
make format
command after configuring withcmake
.If preparing for a new release, in addition please check the following: