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
2fa19375
Commit
2fa19375
authored
Feb 25, 2019
by
Matthieu Schaller
Browse files
In the task_overlap function, escape early if the union is 0
parent
cd058167
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/IsolatedGalaxy/IsolatedGalaxy_starformation/isolated_galaxy.yml
View file @
2fa19375
...
...
@@ -35,7 +35,7 @@ Statistics:
# Parameters related to the initial conditions
InitialConditions
:
file_name
:
fid
.hdf5
# The file to read
file_name
:
lowres8
.hdf5
# The file to read
periodic
:
0
# Are we running with periodic ICs?
stars_smoothing_length
:
0.5
...
...
src/task.c
View file @
2fa19375
...
...
@@ -283,7 +283,6 @@ float task_overlap(const struct task *restrict ta,
if
(
tb
->
ci
!=
NULL
)
size_union
+=
tb
->
ci
->
hydro
.
count
;
if
(
tb
->
cj
!=
NULL
)
size_union
+=
tb
->
cj
->
hydro
.
count
;
// MATTHIEU: This should not be necessary
if
(
size_union
==
0
)
return
0
.
f
;
/* Compute the intersection of the cell data. */
...
...
@@ -305,6 +304,8 @@ float task_overlap(const struct task *restrict ta,
if
(
tb
->
ci
!=
NULL
)
size_union
+=
tb
->
ci
->
grav
.
count
;
if
(
tb
->
cj
!=
NULL
)
size_union
+=
tb
->
cj
->
grav
.
count
;
if
(
size_union
==
0
)
return
0
.
f
;
/* Compute the intersection of the cell data. */
const
size_t
size_intersect
=
task_cell_overlap_gpart
(
ta
->
ci
,
tb
->
ci
)
+
task_cell_overlap_gpart
(
ta
->
ci
,
tb
->
cj
)
+
...
...
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