From bd8bf086a0f81f045b105e44926a3b3cfa006c98 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Thu, 24 Oct 2019 18:36:09 +0200 Subject: [PATCH] Do not attempt to do enrichment if the stars' kernel is far from complete. --- src/feedback/EAGLE/feedback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/feedback/EAGLE/feedback.c b/src/feedback/EAGLE/feedback.c index d041969e80..18b7d7ceb9 100644 --- a/src/feedback/EAGLE/feedback.c +++ b/src/feedback/EAGLE/feedback.c @@ -719,7 +719,7 @@ void compute_stellar_evolution(const struct feedback_props* feedback_props, const float ngb_gas_mass = sp->feedback_data.to_collect.ngb_mass; /* Check if there are neighbours, otherwise exit */ - if (ngb_gas_mass == 0.f) { + if (ngb_gas_mass == 0.f || sp->density.wcount * pow_dimension(sp->h) < 1e-4) { feedback_reset_feedback(sp, feedback_props); return; } -- GitLab