From 70a7f4125a9a0b19ef485ca1921f785d2c2b3b10 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Wed, 9 Oct 2019 15:33:17 +0200 Subject: [PATCH] Put the FPE check back in for now. There might still be unexpected problematic side cases that need special treatment in the enrichment routine. --- src/feedback/EAGLE/feedback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/feedback/EAGLE/feedback.c b/src/feedback/EAGLE/feedback.c index e576eab173..d041969e80 100644 --- a/src/feedback/EAGLE/feedback.c +++ b/src/feedback/EAGLE/feedback.c @@ -735,7 +735,8 @@ void compute_stellar_evolution(const struct feedback_props* feedback_props, feedback_reset_feedback(sp, feedback_props); /* Update the weights used for distribution */ - const float enrichment_weight = 1.f / enrichment_weight_inv; + const float enrichment_weight = + (enrichment_weight_inv != 0.f) ? 1.f / enrichment_weight_inv : 0.f; sp->feedback_data.to_distribute.enrichment_weight = enrichment_weight; /* Compute properties of the stochastic SNII feedback model. */ -- GitLab