Closed drobnyjt closed 3 years ago
Assertions that panic when the particle energy becomes NaN following the two most likely culprits of any failing calculation (nuclear and electronic stopping) have been added. Until NaNs are detected again somewhere else, this issue will be closed.
Some calculations that may produce NaNs are not checked appropriately - in the above example, the surface refraction code is the first time the NaNs are caught from bad input. I believe the NaNs are produced in the nonlocal electronic stopping section. More robust NaN handling should be added on calculations that, depending on user input, could fail in this way.