Commit 3e48a178 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Skip kicks and force tasks in engine_init_particles()

parent 52b1c8bc
......@@ -2501,6 +2501,25 @@ void engine_print_stats(struct engine *e) {
clocks_getunit());
}
/**
* @brief Sets all the force and kick tasks to be skipped.
*
* @param e The #engine to act on.
*/
void engine_skip_force_and_kick(struct engine *e) {
struct task *tasks = e->sched.tasks;
const int nr_tasks = e->sched.nr_tasks;
for (int i = 0; i < nr_tasks; ++i) {
struct task *t = &tasks[i];
if (t->subtype == task_subtype_force || t->type == task_type_kick)
t->skip = 1;
}
}
/**
* @brief Launch the runners.
*
......@@ -2562,6 +2581,9 @@ void engine_init_particles(struct engine *e, int flag_entropy_ICs) {
engine_marktasks(e);
/* No time integration. We just want the density and ghosts */
engine_skip_force_and_kick(e);
/* Now, launch the calculation */
TIMER_TIC;
engine_launch(e, e->nr_threads);
......
......@@ -681,7 +681,7 @@ void scheduler_splittasks(struct scheduler *s) {
* @param wait The number of unsatisfied dependencies of this task.
* @param ci The first cell to interact.
* @param cj The second cell to interact.
* @param tight
* @param tight
*/
struct task *scheduler_addtask(struct scheduler *s, enum task_types type,
enum task_subtypes subtype, int flags, int wait,
......
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