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
cfd96b50
Commit
cfd96b50
authored
Jul 17, 2017
by
Peter W. Draper
Browse files
Clarify some comments on this fix
parent
48782434
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/engine.c
View file @
cfd96b50
...
...
@@ -3360,9 +3360,10 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs,
engine_collect_timestep_and_rebuild
(
e
,
1
);
/* Check if any particles have the same position and see if we need to
* correct the cell h_max to match possible particle updates in the ghost
* tasks. */
if
(
s
->
cells_top
!=
NULL
)
{
* correct the top-level cell h_max to match possible particle updates in
* the ghost tasks. Note this must be followed by a rebuild as sub-cells
* will not be updated until that is done. */
if
(
s
->
cells_top
!=
NULL
&&
s
->
nr_parts
>
0
)
{
/* Sorting should put the same positions next to each other... */
int
failed
=
0
;
...
...
@@ -3378,7 +3379,7 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs,
prev_x
=
s
->
parts
[
k
].
x
;
}
if
(
failed
)
error
(
"Cannot have particles with the same
posi
tions"
);
error
(
"Cannot have particles with the same
loca
tions"
);
for
(
int
i
=
0
;
i
<
s
->
nr_cells
;
i
++
)
{
struct
cell
*
c
=
&
s
->
cells_top
[
i
];
...
...
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