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
0c082205
Commit
0c082205
authored
Jun 27, 2017
by
Pedro Gonnet
Browse files
formatting.
parent
73466101
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
0c082205
...
...
@@ -1356,7 +1356,7 @@ void cell_activate_drift_part(struct cell *c, struct scheduler *s) {
*/
void
cell_activate_sorts
(
struct
cell
*
c
,
int
sid
,
struct
scheduler
*
s
)
{
void
cell_activate_sorts_up
(
struct
cell
*
c
,
struct
scheduler
*
s
)
{
void
cell_activate_sorts_up
(
struct
cell
*
c
,
struct
scheduler
*
s
)
{
if
(
c
==
c
->
super
)
{
scheduler_activate
(
s
,
c
->
sorts
);
if
(
c
->
nodeID
==
engine_rank
)
scheduler_activate
(
s
,
c
->
drift_part
);
...
...
@@ -1366,7 +1366,8 @@ void cell_activate_sorts(struct cell *c, int sid, struct scheduler *s) {
parent
->
do_sub_sort
=
1
;
if
(
parent
==
c
->
super
)
{
scheduler_activate
(
s
,
parent
->
sorts
);
if
(
parent
->
nodeID
==
engine_rank
)
scheduler_activate
(
s
,
parent
->
drift_part
);
if
(
parent
->
nodeID
==
engine_rank
)
scheduler_activate
(
s
,
parent
->
drift_part
);
break
;
}
}
...
...
src/cell.h
View file @
0c082205
...
...
@@ -339,10 +339,10 @@ struct cell {
/*! Do any of this cell's sub-cells need to be drifted? */
char
do_sub_drift
;
/*! Bit mask of sorts that need to be computed for this cell. */
unsigned
int
do_sort
;
/*! Do any of this cell's sub-cells need to be sorted? */
char
do_sub_sort
;
...
...
src/runner.c
View file @
0c082205
...
...
@@ -332,13 +332,14 @@ void runner_do_sort(struct runner *r, struct cell *c, int flags, int cleanup,
float
buff
[
8
];
TIMER_TIC
;
/* We need to do the local sorts plus whatever was requested further up. */
flags
|=
c
->
do_sort
;
if
(
flags
==
0
&&
!
c
->
do_sub_sort
)
return
;
/* Check that the particles have been moved to the current time */
if
(
flags
&&
!
cell_are_part_drifted
(
c
,
r
->
e
))
error
(
"Sorting un-drifted cell"
);
if
(
flags
&&
!
cell_are_part_drifted
(
c
,
r
->
e
))
error
(
"Sorting un-drifted cell"
);
#ifdef SWIFT_DEBUG_CHECKS
/* Make sure the sort flags are consistent (downward). */
...
...
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