Merged requested to merge drift_on_demand into master
Fix to the time integration bug that triggers #248 (closed).
As written in the minutes, finding all the cells that need to be drifted can be really difficult in some convoluted situations and I'd like to avoid a full tree walk.
My solution is as follows:
- (Re-)Create a drift task. When a cell has active particles, it's drift task is active
runner_do_driftfunction gets replaced by a
runner_do_unskipfunction that does not touch the particles but just updates the status of the tasks.#
- There is a
runner_do_drift_allfunction that drifts everything for the cases where we need this (rebuild or snapshot).
- If a pair task involves a cell that is inactive and has hence not been drifted, the pair task starts by calling the drift operation on this cell and then carries on with its regular work. Most of the drifts are done via the regular task though.
In terms of performance it looks fairly similar to the current master. But now it is physically correct.