Skip to content
GitLab
Menu
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
48f5ecb7
Commit
48f5ecb7
authored
Nov 13, 2018
by
Matthieu Schaller
Browse files
Make the star formation task lock it's part of the tree.
parent
e295df53
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
48f5ecb7
...
@@ -380,6 +380,11 @@ void task_unlock(struct task *t) {
...
@@ -380,6 +380,11 @@ void task_unlock(struct task *t) {
cell_munlocktree
(
cj
);
cell_munlocktree
(
cj
);
break
;
break
;
case
task_type_star_formation
:
cell_unlocktree
(
ci
);
cell_sunlocktree
(
ci
);
cell_gunlocktree
(
ci
);
default:
default:
break
;
break
;
}
}
...
@@ -518,6 +523,21 @@ int task_lock(struct task *t) {
...
@@ -518,6 +523,21 @@ int task_lock(struct task *t) {
cell_munlocktree
(
ci
);
cell_munlocktree
(
ci
);
return
0
;
return
0
;
}
}
break
;
case
task_type_star_formation
:
/* Lock the gas, gravity and star particles */
if
(
ci
->
hydro
.
hold
||
ci
->
stars
.
hold
||
ci
->
grav
.
phold
)
return
0
;
if
(
cell_locktree
(
ci
)
!=
0
)
return
0
;
if
(
cell_slocktree
(
ci
)
!=
0
)
{
cell_unlocktree
(
ci
);
return
0
;
}
if
(
cell_glocktree
(
ci
)
!=
0
)
{
cell_unlocktree
(
ci
);
cell_sunlocktree
(
ci
);
return
0
;
}
default:
default:
break
;
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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