diff --git a/src/hydro/MAGMA/hydro_iact.h b/src/hydro/MAGMA/hydro_iact.h index b7d979f7d2f90e2a0705daa9b341773c21c04e8e..d9da3766cc2fb993712f77c4d79458b7d6637ef0 100644 --- a/src/hydro/MAGMA/hydro_iact.h +++ b/src/hydro/MAGMA/hydro_iact.h @@ -327,7 +327,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force( : 1.f; /* Van Leer limiter (eq. 21) */ - const float fraction = 4.f * A_ij / ((1.f + A_ij) * (1.f + A_ij)); + const float fraction = + (A_ij != -1.f) ? 4.f * A_ij / ((1.f + A_ij) * (1.f + A_ij)) : 1.f; const float Phi_ij = fmaxf(0.f, fminf(1.f, fraction)) * exp_term; /* Mid-point reconstruction, first order (eq. 17) */