Skip to content
Snippets Groups Projects
Commit f1235181 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Avoid a FPE arising from compiler optimisation of the h < h_min branch of the ghost.

parent 466714fb
No related branches found
No related tags found
No related merge requests found
......@@ -1462,12 +1462,6 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) {
/* Ok, this particle is a lost cause... */
p->h = hydro_h_min;
/* Do some damage control if no neighbours at all were found */
if (has_no_neighbours) {
hydro_part_has_no_neighbours(p, xp, cosmo);
chemistry_part_has_no_neighbours(p, xp, chemistry, cosmo);
}
} else if (p->h >= hydro_h_max) {
/* Ok, this particle is a lost cause... */
......
......@@ -601,7 +601,7 @@ int main(int argc, char *argv[]) {
hp.eta_neighbours = h;
hp.h_tolerance = 1e0;
hp.h_max = FLT_MAX;
hp.h_min = h / 1e6;
hp.h_min = 0.f;
hp.h_min_ratio = 0.f;
hp.max_smoothing_iterations = 10;
hp.CFL_condition = 0.1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment