IAP GITLAB

Skip to content
Snippets Groups Projects
Commit b4b4a5a8 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

throw exception on NaN generation in Sibyll decay function

parent fc91d2a2
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,8 @@
#include <corsika/particles/ParticleProperties.h>
#include <fenv.h>
namespace corsika::process {
namespace sibyll {
......@@ -145,6 +147,9 @@ namespace corsika::process {
void DoDecay(Particle& p, Stack& s) const {
using corsika::geometry::Point;
using namespace corsika::units::si;
feenableexcept(FE_INVALID);
fCount++;
SibStack ss;
ss.Clear();
......@@ -188,6 +193,8 @@ namespace corsika::process {
}
// empty sibyll stack
ss.Clear();
fedisableexcept(FE_INVALID);
}
};
} // namespace sibyll
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment