diff --git a/corsika/detail/framework/core/Cascade.inl b/corsika/detail/framework/core/Cascade.inl index 6a1012e1bdca7f3d18cdcfb4793e864e1ac78adc..01dda2c08b9f7bdca2b9a84138983741d3d79d6a 100644 --- a/corsika/detail/framework/core/Cascade.inl +++ b/corsika/detail/framework/core/Cascade.inl @@ -296,6 +296,22 @@ namespace corsika { CORSIKA_LOG_DEBUG("step limit reached (e.g. deflection). nothing further happens."); + // final sanity check, no actions + { + auto const* numericalNodeAfterStep = + environment_.getUniverse()->getContainingNode(particle.getPosition()); + CORSIKA_LOG_TRACE( + "Geometry check: numericalNodeAfterStep={} currentLogicalNode={}", + fmt::ptr(numericalNodeAfterStep), fmt::ptr(currentLogicalNode)); + if (numericalNodeAfterStep != currentLogicalNode) { + CORSIKA_LOG_DEBUG( + "expect to be in node currentLogicalNode={} but are in " + "numericalNodeAfterStep={}. Continue, but without guarantee.", + fmt::ptr(currentLogicalNode), fmt::ptr(numericalNodeAfterStep)); + } + } + // we did not cross any volume boundary + // step length limit return; } diff --git a/corsika/detail/modules/tracking/Intersect.inl b/corsika/detail/modules/tracking/Intersect.inl index 1049534eaa6e6367b509dbfcb2831f3afaf82fc9..f25bbe491fc2dd97cf66b8a87a5f7b215012cc8b 100644 --- a/corsika/detail/modules/tracking/Intersect.inl +++ b/corsika/detail/modules/tracking/Intersect.inl @@ -107,7 +107,7 @@ namespace corsika { // this branch cannot be unit-testes. This is malfunction: LCOV_EXCL_START if (minTime < 0_s) { if (minTime < -1e-8_s) { - CORSIKA_LOG_ERROR( + CORSIKA_LOG_DEBUG( "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.",