Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
f1235181
Commit
f1235181
authored
Feb 08, 2019
by
Matthieu Schaller
Browse files
Avoid a FPE arising from compiler optimisation of the h < h_min branch of the ghost.
parent
466714fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/runner.c
View file @
f1235181
...
...
@@ -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... */
...
...
tests/test125cells.c
View file @
f1235181
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment