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
30a0eca4
Commit
30a0eca4
authored
Mar 20, 2020
by
Loic Hausammann
Browse files
Task order: remove cooling
parent
1d676231
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
30a0eca4
...
...
@@ -1491,8 +1491,7 @@ case "$with_subgrid" in
with_subgrid_star_formation=GEAR
with_subgrid_feedback=GEAR
with_subgrid_black_holes=none
# GEAR's order is not used anymore
with_subgrid_task_order=default
with_subgrid_task_order=GEAR
enable_fof=no
;;
QLA)
...
...
src/#single_io.c#
0 → 100644
View file @
30a0eca4
This diff is collapsed.
Click to expand it.
src/engine_maketasks.c
View file @
30a0eca4
...
...
@@ -1166,7 +1166,8 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c,
c
->
hydro
.
cooling
=
scheduler_addtask
(
s
,
task_type_cooling
,
task_subtype_none
,
0
,
0
,
c
,
NULL
);
task_order_addunlock_cooling
(
s
,
c
);
scheduler_addunlock
(
s
,
c
->
hydro
.
end_force
,
c
->
hydro
.
cooling
);
scheduler_addunlock
(
s
,
c
->
hydro
.
cooling
,
c
->
super
->
kick2
);
}
else
{
scheduler_addunlock
(
s
,
c
->
hydro
.
end_force
,
c
->
super
->
kick2
);
...
...
src/runner_others.c
View file @
30a0eca4
...
...
@@ -165,9 +165,9 @@ void runner_do_cooling(struct runner *r, struct cell *c, int timer) {
TIMER_TIC
;
/* Anything to do here? (i.e. does this cell need updating?) */
if
(
!
((
task_order_cooling_after_timestep
&&
cell_is_starting_hydro
(
c
,
e
))
||
(
!
task_order_cooling_after_timestep
&&
cell_is_active_hydro
(
c
,
e
))))
if
(
!
cell_is_active_hydro
(
c
,
e
))
{
return
;
}
/* Recurse? */
if
(
c
->
split
)
{
...
...
@@ -183,8 +183,7 @@ void runner_do_cooling(struct runner *r, struct cell *c, int timer) {
struct
xpart
*
restrict
xp
=
&
xparts
[
i
];
/* Anything to do here? (i.e. does this particle need updating?) */
if
((
task_order_cooling_after_timestep
&&
part_is_starting
(
p
,
e
))
||
(
!
task_order_cooling_after_timestep
&&
part_is_active
(
p
,
e
)))
{
if
(
part_is_active
(
p
,
e
))
{
double
dt_cool
,
dt_therm
;
if
(
with_cosmology
)
{
...
...
src/task_order/EAGLE/task_order.h
View file @
30a0eca4
...
...
@@ -24,11 +24,6 @@
*/
#define task_order_star_formation_before_feedback 1
/**
* Is the cooling task running after the time-step calculation task?
*/
#define task_order_cooling_after_timestep 0
/**
* @brief Place the star formation cell at the right place in the dependency
* graph.
...
...
@@ -48,22 +43,4 @@ INLINE static void task_order_addunlock_star_formation_feedback(
c
->
stars
.
stars_in
);
}
/**
* @brief Place the cooling cell at the right place in the dependency
* graph.
*
* The default model follows EAGLE.
*
* In EAGLE, the cooling takes place between the hydro and the kick2.
*
* @param s The #scheduler.
* @param c The #cell on which to act.
*/
INLINE
static
void
task_order_addunlock_cooling
(
struct
scheduler
*
s
,
struct
cell
*
c
)
{
scheduler_addunlock
(
s
,
c
->
hydro
.
end_force
,
c
->
hydro
.
cooling
);
scheduler_addunlock
(
s
,
c
->
hydro
.
cooling
,
c
->
super
->
kick2
);
}
#endif
/* SWIFT_TASK_ORDER_EAGLE_H */
src/task_order/GEAR/task_order.h
View file @
30a0eca4
...
...
@@ -24,11 +24,6 @@
*/
#define task_order_star_formation_before_feedback 0
/**
* Is the cooling task running after the time-step calculation task?
*/
#define task_order_cooling_after_timestep 1
/**
* @brief Place the star formation cell at the right place in the dependency
* graph.
...
...
@@ -47,20 +42,4 @@ INLINE static void task_order_addunlock_star_formation_feedback(
scheduler_addunlock
(
s
,
c
->
stars
.
stars_out
,
c
->
top
->
hydro
.
star_formation
);
}
/**
* @brief Place the cooling cell at the right place in the dependency
* graph.
*
* In GEAR, the cooling takes place after the kick1.
*
* @param s The #scheduler.
* @param c The #cell on which to act.
*/
INLINE
static
void
task_order_addunlock_cooling
(
struct
scheduler
*
s
,
struct
cell
*
c
)
{
scheduler_addunlock
(
s
,
c
->
super
->
kick1
,
c
->
hydro
.
cooling
);
scheduler_addunlock
(
s
,
c
->
hydro
.
end_force
,
c
->
super
->
kick2
);
}
#endif
/* SWIFT_TASK_ORDER_GEAR_H */
src/task_order/default/task_order.h
View file @
30a0eca4
...
...
@@ -30,11 +30,6 @@
*/
#define task_order_star_formation_before_feedback 1
/**
* Is the cooling task running after the time-step calculation task?
*/
#define task_order_cooling_after_timestep 0
/**
* @brief Place the star formation cell at the right place in the dependency
* graph.
...
...
@@ -56,22 +51,5 @@ INLINE static void task_order_addunlock_star_formation_feedback(
c
->
stars
.
stars_in
);
}
/**
* @brief Place the cooling cell at the right place in the dependency
* graph.
*
* The default model follows EAGLE.
*
* In EAGLE, the cooling takes place between the hydro and the kick2.
*
* @param s The #scheduler.
* @param c The #cell on which to act.
*/
INLINE
static
void
task_order_addunlock_cooling
(
struct
scheduler
*
s
,
struct
cell
*
c
)
{
scheduler_addunlock
(
s
,
c
->
hydro
.
end_force
,
c
->
hydro
.
cooling
);
scheduler_addunlock
(
s
,
c
->
hydro
.
cooling
,
c
->
super
->
kick2
);
}
#endif
/* SWIFT_TASK_ORDER_DEFAULT_H */
Write
Preview
Markdown
is supported
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