diff --git a/src/engine.c b/src/engine.c index 980183041cdcd33bcf706c9b99985dfabb1804d4..5c788dfb4ee50ad1181cd520e890b76f32a8a113 100644 --- a/src/engine.c +++ b/src/engine.c @@ -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); diff --git a/src/scheduler.c b/src/scheduler.c index 1022afc206302fd7ef0c5e28faf84f71a4d1b946..676b561722fde40ad41332bb997502abd2970042 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -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,