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
2de5c83f
Commit
2de5c83f
authored
Jul 27, 2017
by
Pedro Gonnet
Browse files
avoid divide-by-zero if the cell has no hydro parts as it may have gravity parts.
parent
a0106530
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scheduler.c
View file @
2de5c83f
...
...
@@ -210,7 +210,8 @@ static void scheduler_splittask_hydro(struct task *t, struct scheduler *s) {
if
(
cell_can_split_pair_task
(
ci
)
&&
cell_can_split_pair_task
(
cj
))
{
/* Replace by a single sub-task? */
if
(
scheduler_dosub
&&
/* Use division to avoid integer overflow. */
if
(
scheduler_dosub
&&
ci
->
count
&&
cj
->
count
&&
/* Use division to avoid integer overflow. */
ci
->
count
*
sid_scale
[
sid
]
<
space_subsize_pair
/
cj
->
count
&&
!
sort_is_corner
(
sid
))
{
...
...
@@ -560,6 +561,7 @@ static void scheduler_splittask_hydro(struct task *t, struct scheduler *s) {
/* Otherwise, break it up if it is too large? */
}
else
if
(
scheduler_doforcesplit
&&
ci
->
split
&&
cj
->
split
&&
ci
->
count
&&
cj
->
count
&&
(
ci
->
count
>
space_maxsize
/
cj
->
count
))
{
// message( "force splitting pair with %i and %i parts." , ci->count ,
...
...
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