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
1 merge request!42Resolve "missing rotation between corsika stack and sibyll stack"
Pipeline #117 failed
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include <corsika/particles/ParticleProperties.h> #include <corsika/particles/ParticleProperties.h>
#include <fenv.h>
namespace corsika::process { namespace corsika::process {
namespace sibyll { namespace sibyll {
...@@ -145,6 +147,9 @@ namespace corsika::process { ...@@ -145,6 +147,9 @@ namespace corsika::process {
void DoDecay(Particle& p, Stack& s) const { void DoDecay(Particle& p, Stack& s) const {
using corsika::geometry::Point; using corsika::geometry::Point;
using namespace corsika::units::si; using namespace corsika::units::si;
feenableexcept(FE_INVALID);
fCount++; fCount++;
SibStack ss; SibStack ss;
ss.Clear(); ss.Clear();
...@@ -188,6 +193,8 @@ namespace corsika::process { ...@@ -188,6 +193,8 @@ namespace corsika::process {
} }
// empty sibyll stack // empty sibyll stack
ss.Clear(); ss.Clear();
fedisableexcept(FE_INVALID);
} }
}; };
} // namespace sibyll } // 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