Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
d2473e20
Commit
d2473e20
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
In marktasks, with SF on, also activate the star tasks if the cell is active for hydro purposes.
parent
e6f2b36c
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!805
Communication tasks for on-the-fly star formation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/engine_marktasks.c
+14
-7
14 additions, 7 deletions
src/engine_marktasks.c
with
14 additions
and
7 deletions
src/engine_marktasks.c
+
14
−
7
View file @
d2473e20
...
...
@@ -93,9 +93,10 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
#endif
const
int
ci_active_hydro
=
cell_is_active_hydro
(
ci
,
e
);
const
int
ci_active_gravity
=
cell_is_active_gravity
(
ci
,
e
);
const
int
ci_active_stars
=
cell_is_active_stars
(
ci
,
e
);
const
int
ci_active_black_holes
=
cell_is_active_black_holes
(
ci
,
e
);
const
int
ci_active_stars
=
cell_is_active_stars
(
ci
,
e
)
||
(
with_star_formation
&&
ci_active_hydro
);
/* Activate the hydro drift */
if
(
t_type
==
task_type_self
&&
t_subtype
==
task_subtype_density
)
{
if
(
ci_active_hydro
)
{
...
...
@@ -248,12 +249,14 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
const
int
ci_active_gravity
=
cell_is_active_gravity
(
ci
,
e
);
const
int
cj_active_gravity
=
cell_is_active_gravity
(
cj
,
e
);
const
int
ci_active_stars
=
cell_is_active_stars
(
ci
,
e
);
const
int
cj_active_stars
=
cell_is_active_stars
(
cj
,
e
);
const
int
ci_active_black_holes
=
cell_is_active_black_holes
(
ci
,
e
);
const
int
cj_active_black_holes
=
cell_is_active_black_holes
(
cj
,
e
);
const
int
ci_active_stars
=
cell_is_active_stars
(
ci
,
e
)
||
(
with_star_formation
&&
ci_active_hydro
);
const
int
cj_active_stars
=
cell_is_active_stars
(
cj
,
e
)
||
(
with_star_formation
&&
cj_active_hydro
);
/* Only activate tasks that involve a local active cell. */
if
((
t_subtype
==
task_subtype_density
||
t_subtype
==
task_subtype_gradient
||
...
...
@@ -868,12 +871,16 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
/* Star ghost tasks ? */
else
if
(
t_type
==
task_type_stars_ghost
)
{
if
(
cell_is_active_stars
(
t
->
ci
,
e
))
scheduler_activate
(
s
,
t
);
if
(
cell_is_active_stars
(
t
->
ci
,
e
)
||
(
with_star_formation
&&
cell_is_active_hydro
(
t
->
ci
,
e
)))
scheduler_activate
(
s
,
t
);
}
/* Feedback implicit tasks? */
else
if
(
t_type
==
task_type_stars_in
||
t_type
==
task_type_stars_out
)
{
if
(
cell_is_active_stars
(
t
->
ci
,
e
))
scheduler_activate
(
s
,
t
);
if
(
cell_is_active_stars
(
t
->
ci
,
e
)
||
(
with_star_formation
&&
cell_is_active_hydro
(
t
->
ci
,
e
)))
scheduler_activate
(
s
,
t
);
}
/* Black hole ghost tasks ? */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment