Skip to content

Sink iact overhauled to match BHs

Jonathan Davies requested to merge sink_iact_update into master

Here's my attempt at overhauling the sink interactions such that they match the infrastructure for all the other particle types. I've used the BHs as a model, as right now the sinks only have swallow interactions.

I think I've made things consistent with the BHs, and the code compiles and appears to successfully run the Plummer sphere example simulation with the GEAR model.

Here's what I've changed:

  • All self/pair/sub interaction functions have been moved from runner_sinks.h to a new file runner_doiact_functions_sinks.h for consistency with BHs.
  • These functions are now declared in runner_doiact_sinks.h by pasting names around in the same way as the BHs are. All functions have been re-named accordingly.
  • I'm now importing these functions in runner_main.h and the new file runner_doiact_sinks.c as appropriate, and I added the relevant lines to runner_iact_undef.h.
  • I moved the declarations of the swallowing functions (e.g. runner_do_sinks_gas_swallow_self) from runner_doiact_sinks.h to runner.h for consistency with the BHs.

Please let me know if there's anything I've missed or that I should change. I requested a review from @matthieu but @Roduit please do have a look as well! For now I'm going to take this new code layout and try porting in the density interactions on a new branch.

Merge request reports