Skip to content
Snippets Groups Projects
Commit 4e3492b3 authored by Yolan Uyttenhove's avatar Yolan Uyttenhove
Browse files

make debug check stricter

parent a4be83fa
No related branches found
No related tags found
2 merge requests!1825Chemistry API changes for metal fluxes,!1749Draft: Merge the moving mesh hydro scheme in master
......@@ -391,8 +391,12 @@ __attribute__((always_inline)) INLINE static void chemistry_kick_extra(
for (int i = 0; i < chemistry_element_count; i++) {
sum += p->chemistry_data.metal_mass_fraction[i];
}
if (sum > 1.f)
error("Sum of element-wise metal mass fractions grew larger than 1!");
sum -= p->chemistry_data.metal_mass_fraction[chemistry_element_H];
sum -= p->chemistry_data.metal_mass_fraction[chemistry_element_He];
if (sum > p->chemistry_data.metal_mass_fraction_total)
error(
"Sum of element-wise metal mass fractions grew larger than total "
"metal mass fraction!");
#endif
chemistry_reset_mass_fluxes(p);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment