Skip to content
Snippets Groups Projects
Commit 58f29c27 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Fix FPE in some strange MAGMA configuration

parent d436918d
No related branches found
No related tags found
5 merge requests!1935corrected version of cosmological makeIC.py,!1887Updating . . .,!1878updating working branch,!1777Draft: Streamlined MAGMA2 implementation,!1530Draft: Blank functions for MHD support
......@@ -326,7 +326,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) */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment