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
b6954567
Commit
b6954567
authored
May 24, 2018
by
Matthieu Schaller
Committed by
Matthieu Schaller
Jun 18, 2018
Browse files
Make sure the new task is activated correctly.
parent
101181ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
b6954567
...
...
@@ -2302,6 +2302,7 @@ int cell_unskip_gravity_tasks(struct cell *c, struct scheduler *s) {
if
(
c
->
timestep
!=
NULL
)
scheduler_activate
(
s
,
c
->
timestep
);
if
(
c
->
end_force
!=
NULL
)
scheduler_activate
(
s
,
c
->
end_force
);
if
(
c
->
grav_down
!=
NULL
)
scheduler_activate
(
s
,
c
->
grav_down
);
if
(
c
->
grav_mesh
!=
NULL
)
scheduler_activate
(
s
,
c
->
grav_mesh
);
if
(
c
->
grav_long_range
!=
NULL
)
scheduler_activate
(
s
,
c
->
grav_long_range
);
}
...
...
src/engine.c
View file @
b6954567
...
...
@@ -3592,7 +3592,7 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
}
/* Gravity stuff ? */
else
if
(
t
->
type
==
task_type_grav_down
||
else
if
(
t
->
type
==
task_type_grav_down
||
t
->
type
==
task_type_grav_mesh
||
t
->
type
==
task_type_grav_long_range
||
t
->
type
==
task_type_init_grav
)
{
if
(
cell_is_active_gravity
(
t
->
ci
,
e
))
scheduler_activate
(
s
,
t
);
...
...
src/task.c
View file @
b6954567
...
...
@@ -180,6 +180,7 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
case
task_type_drift_gpart
:
case
task_type_grav_down
:
case
task_type_grav_mesh
:
return
task_action_gpart
;
break
;
...
...
@@ -290,6 +291,7 @@ void task_unlock(struct task *t) {
break
;
case
task_type_drift_gpart
:
case
task_type_grav_mesh
:
cell_gunlocktree
(
ci
);
break
;
...
...
@@ -385,6 +387,7 @@ int task_lock(struct task *t) {
break
;
case
task_type_drift_gpart
:
case
task_type_grav_mesh
:
if
(
ci
->
ghold
)
return
0
;
if
(
cell_glocktree
(
ci
)
!=
0
)
return
0
;
break
;
...
...
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