Quite regularly (e.g. reported by @Nikos in the last general meeting), shower simulations throw the warning:
There is a very negative time step detected: -1.42207e-17 s. This is not physical and may easily crash subsequent modules. Set to 0_s, but CHECK AND FIX.
From a first debugging, this happens especially for low-energy electrons/positrons.
Furthermore, the warning seems to vanish if one turns of multiple scattering, so this seems to be related.
However, I don't yet understand why this is related, because next_intersect() (where the error is thrown) is called from getTrack(), but getTrack() is called in Cascade.inl before the continuous processes (and therefore multiple scattering) is applied.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
I have one question about the code in Intersect.inl which throws the error message:
if (minTime < 0_s) { if (minTime < 1e-8_s) { CORSIKA_LOG_ERROR( "There is a very negative time step detected: {}. This is not physical and " "may " "easily crash subsequent modules. Set to 0_s, but CHECK AND FIX.", minTime); } minTime = 0_s; // LCOV_EXCL_STOP }
If the first condition minTime < 0_s is true, the second condition minTime < 1e-8_s always true as well, right? This is why warning such as
[corsika:error (Intersect.inl:114)] There is a very negative time step detected: -1.27084e-17 s. This is not physical and may easily crash subsequent modules. Set to 0_s, but CHECK AND FIX.
is being printed. Is it possible that the code was intended to have the condition std::abs(minTime) < 1e-8_s? So maybe this error message isn't supposed to be thrown at all...
Another comment: This code/warning has been introduced with commit a8d6de9e. The lines have been written to account for numerical instabilities, which I concluded came from the tracking algorithm being inaccurate at border transitions (see #429 (closed)).