Castro
Castro copied to clipboard
PPM tracing can generate negative gamma
It's possible for gamma to go negative when tracing if the timestep is much larger than it should be. Since the sound speed goes as sqrt(gamma), this results in c becoming NaN, resulting in fluid variables going to NaN as well. Normally we should avoid taking a timestep much larger than what the CFL criterion would require (#2222), but in case we fail to do so for whatever reason, we want to avoid generating NaNs, which are hard to gracefully recover from. It would be good if we detected failure modes like this in the PPM and issued a retry.