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

Fix FPE in some strange MAGMA configuration

parent 92f149ee
Branches
No related tags found
4 merge requests!1935corrected version of cosmological makeIC.py,!1887Updating . . .,!1878updating working branch,!1530SPMHD implementations on top of SPHENIX and SPMHD examples
...@@ -327,7 +327,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force( ...@@ -327,7 +327,8 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force(
: 1.f; : 1.f;
/* Van Leer limiter (eq. 21) */ /* 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; const float Phi_ij = fmaxf(0.f, fminf(1.f, fraction)) * exp_term;
/* Mid-point reconstruction, first order (eq. 17) */ /* 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