Skip to content

Engine policies for gravity and improved task mask construction

Matthieu Schaller requested to merge more_policies into master

This is a straightforward change to engine_step() and engine_init_particles() that should allow other users to add or remove tasks without having to comment-out portions of the code.

The right list of policies simply has to be passed to the engine when constructed. I have added three policies (hydro, external gravity and self gravity) to be future proof.

I have also resurrected the two functions that print the content of a mask. These had disappeared following a merge. Finally, some more robust bit-mask checking tests are done when testing policies.

That should allow @jregan and @tt to add their external gravity tasks to the mask on line 1901 (in engine_step()) of engine.c without having to comment-out other parts of the code.

Merge request reports