Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,21 @@ chemistry_part_has_no_neighbours(struct part* restrict p, ...@@ -129,7 +129,21 @@ chemistry_part_has_no_neighbours(struct part* restrict p,
struct xpart* restrict xp, struct xpart* restrict xp,
const struct chemistry_global_data* cd, const struct chemistry_global_data* cd,
const struct cosmology* cosmo) { 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];
}
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment