Commit 7ed705a7 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Documentation of the new function. Small style changes.

parent c101883c
......@@ -1428,7 +1428,7 @@ case "$with_subgrid" in
with_subgrid_star_formation=GEAR
with_subgrid_feedback=none
with_subgrid_black_holes=none
with_subgrid_task_order=GEAR
with_subgrid_task_order=GEAR
enable_fof=no
;;
EAGLE)
......@@ -1440,7 +1440,7 @@ case "$with_subgrid" in
with_subgrid_star_formation=EAGLE
with_subgrid_feedback=EAGLE
with_subgrid_black_holes=EAGLE
with_subgrid_task_order=EAGLE
with_subgrid_task_order=EAGLE
enable_fof=yes
;;
*)
......@@ -1959,7 +1959,7 @@ GEAR)
AC_DEFINE([TASK_ORDER_GEAR], [1], [GEAR task order])
;;
*)
AC_MSG_ERROR([Unknown feedback model: $with_feedback])
AC_MSG_ERROR([Unknown task ordering: $with_task_order])
;;
esac
......@@ -2198,7 +2198,7 @@ AC_MSG_RESULT([
Star formation model : $with_star_formation
Star feedback model : $with_feedback
Black holes model : $with_black_holes
Task order : $with_task_order
Task dependencies : $with_task_order
Individual timers : $enable_timers
Task debugging : $enable_task_debugging
......
......@@ -239,7 +239,7 @@ nobase_noinst_HEADERS = align.h approx_math.h atomic.h barrier.h cycle.h error.h
pressure_floor/GEAR/pressure_floor.h pressure_floor/none/pressure_floor.h \
pressure_floor/GEAR/pressure_floor_iact.h pressure_floor/none/pressure_floor_iact.h \
pressure_floor/GEAR/pressure_floor_struct.h pressure_floor/none/pressure_floor_struct.h \
task_order/GEAR/task_order.h task_order/EAGLE/task_order.h task_order/none/task_order.h
task_order/GEAR/task_order.h task_order/EAGLE/task_order.h task_order/none/task_order.h
# Sources and special flags for the gravity library
......
......@@ -83,7 +83,6 @@
#include "stars.h"
#include "stars_io.h"
#include "task.h"
#include "task_order.h"
#include "threadpool.h"
#include "timeline.h"
#include "timers.h"
......
......@@ -16,21 +16,28 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_TASK_ORDER_NONE_H
#define SWIFT_TASK_ORDER_NONE_H
#include "cell.h"
#ifndef SWIFT_TASK_ORDER_EAGLE_H
#define SWIFT_TASK_ORDER_EAGLE_H
#define task_order_star_formation_before_feedback 1
__attribute__((always_inline)) INLINE static void
task_order_addunlock_star_formation_feedback(struct scheduler *s,
struct cell *c,
struct cell *star_resort_cell) {
/**
* @brief Place the star formation cell at the right place in the dependency
* graph.
*
* In EAGLE, star formation takes place before the feedback tasks (that are
* launched after the stars_in task).
*
* @param s The #scheduler.
* @param c The #cell on which to act.
* @param star_resort_cell The #cell where the stars re-sorting task is in this
* hierarchy.
*/
INLINE static void task_order_addunlock_star_formation_feedback(
struct scheduler *s, struct cell *c, struct cell *star_resort_cell) {
scheduler_addunlock(s, star_resort_cell->hydro.stars_resort,
c->stars.stars_in);
}
#endif // SWIFT_TASK_ORDER_NONE_H
#endif /* SWIFT_TASK_ORDER_EAGLE_H */
......@@ -16,20 +16,27 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_TASK_ORDER_GEAR_H
#define SWIFT_TASK_ORDER_GEAR_H
#include "cell.h"
#define task_order_star_formation_before_feedback 0
__attribute__((always_inline)) INLINE static void
task_order_addunlock_star_formation_feedback(struct scheduler *s,
struct cell *c,
struct cell *star_resort_cell) {
/**
* @brief Place the star formation cell at the right place in the dependency
* graph.
*
* In GEAR, star formation takes place after the feedback tasks (that are
* finishing with the stars_out task).
*
* @param s The #scheduler.
* @param c The #cell on which to act.
* @param star_resort_cell The #cell where the stars re-sorting task is in this
* hierarchy.
*/
INLINE static void task_order_addunlock_star_formation_feedback(
struct scheduler *s, struct cell *c, struct cell *star_resort_cell) {
scheduler_addunlock(s, c->stars.stars_out, c->top->hydro.star_formation);
}
#endif // SWIFT_TASK_ORDER_GEAR_H
#endif /* SWIFT_TASK_ORDER_GEAR_H */
......@@ -16,21 +16,30 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#ifndef SWIFT_TASK_ORDER_NONE_H
#define SWIFT_TASK_ORDER_NONE_H
#include "cell.h"
#define task_order_star_formation_before_feedback 1
__attribute__((always_inline)) INLINE static void
task_order_addunlock_star_formation_feedback(struct scheduler *s,
struct cell *c,
struct cell *star_resort_cell) {
/**
* @brief Place the star formation cell at the right place in the dependency
* graph.
*
* The default model follows EAGLE.
*
* In EAGLE, star formation takes place before the feedback tasks (that are
* launched after the stars_in task).
*
* @param s The #scheduler.
* @param c The #cell on which to act.
* @param star_resort_cell The #cell where the stars re-sorting task is in this
* hierarchy.
*/
INLINE static void task_order_addunlock_star_formation_feedback(
struct scheduler *s, struct cell *c, struct cell *star_resort_cell) {
scheduler_addunlock(s, star_resort_cell->hydro.stars_resort,
c->stars.stars_in);
}
#endif // SWIFT_TASK_ORDER_NONE_H
#endif /* SWIFT_TASK_ORDER_NONE_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment