Commit a09d0b82 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

If a particle has 0 neighbours, make the EAGLE chemistry model default to the...

If a particle has 0 neighbours, make the EAGLE chemistry model default to the un-smoothed quantities.
parent c76de762
......@@ -129,7 +129,21 @@ chemistry_part_has_no_neighbours(struct part* restrict p,
struct xpart* restrict xp,
const struct chemistry_global_data* cd,
const struct cosmology* cosmo) {
error("Needs implementing!");
/* Just make all the smoothed fields default to the un-smoothed values */
struct chemistry_part_data* cpd = &p->chemistry_data;
/* Total metal mass fraction */
cpd->smoothed_metal_mass_fraction_total = cpd->metal_mass_fraction_total;
/* Iron frac from SNIa */
cpd->smoothed_iron_mass_fraction_from_SNIa =
cpd->iron_mass_fraction_from_SNIa;
/* Individual metal mass fractions */
for (int i = 0; i < chemistry_element_count; i++) {
cpd->smoothed_metal_mass_fraction[i] = cpd->metal_mass_fraction[i];
}
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment